3
0
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:
Daniel Oaks 2017-04-17 23:05:24 +10:00
parent 86957d4392
commit 9cfa92ede8

View File

@ -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
} }