Simplify if block in ISUPPORT handler

This commit is contained in:
Simon Ser 2021-03-15 22:54:32 +01:00
parent ffd142f8dd
commit ff2cd9423f

View File

@ -619,11 +619,9 @@ func (uc *upstreamConn) handleMessage(msg *irc.Message) error {
if strings.HasPrefix(token, "-") { if strings.HasPrefix(token, "-") {
negate = true negate = true
token = token[1:] token = token[1:]
} else { } else if i := strings.IndexByte(token, '='); i >= 0 {
if i := strings.IndexByte(token, '='); i >= 0 { parameter = token[:i]
parameter = token[:i] value = token[i+1:]
value = token[i+1:]
}
} }
if !negate { if !negate {
switch parameter { switch parameter {