1
0
Fork 0
forked from External/ergo
RELAYMSG should respect mutes
This commit is contained in:
Shivaram Lingamneni 2021-03-11 01:21:03 -05:00
parent 76b0e44474
commit fe8e6551c3
2 changed files with 10 additions and 0 deletions

View file

@ -1324,6 +1324,12 @@ func (channel *Channel) isMuted(client *Client) bool {
return muteRe.MatchString(nuh) && !channel.lists[modes.ExceptMask].MatchMute(nuh)
}
func (channel *Channel) relayNickMuted(relayNick string) bool {
relayNUH := fmt.Sprintf("%s!*@*", relayNick)
return channel.lists[modes.BanMask].MatchMute(relayNUH) &&
!channel.lists[modes.ExceptMask].MatchMute(relayNUH)
}
func msgCommandToHistType(command string) (history.ItemType, error) {
switch command {
case "PRIVMSG":