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, "-") {
negate = true
token = token[1:]
} else {
if i := strings.IndexByte(token, '='); i >= 0 {
parameter = token[:i]
value = token[i+1:]
}
} else if i := strings.IndexByte(token, '='); i >= 0 {
parameter = token[:i]
value = token[i+1:]
}
if !negate {
switch parameter {