mirror of
https://github.com/ergochat/ergo.git
synced 2024-11-10 22:19:31 +01:00
modes: Avoid unnecessarily sending unknown mode numerics
This commit is contained in:
parent
86957d4392
commit
9cfa92ede8
11
irc/modes.go
11
irc/modes.go
@ -361,7 +361,16 @@ func ParseChannelModeChanges(params ...string) (ModeChanges, map[rune]bool) {
|
|||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
default:
|
}
|
||||||
|
|
||||||
|
var isKnown bool
|
||||||
|
for _, supportedMode := range SupportedChannelModes {
|
||||||
|
if rune(supportedMode) == mode {
|
||||||
|
isKnown = true
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if !isKnown {
|
||||||
unknown[mode] = true
|
unknown[mode] = true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user