From ff2cd9423f3ae592d50ddb91446bf40d770fee36 Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Mon, 15 Mar 2021 22:54:32 +0100 Subject: [PATCH] Simplify if block in ISUPPORT handler --- upstream.go | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/upstream.go b/upstream.go index deaff49..08dccd9 100644 --- a/upstream.go +++ b/upstream.go @@ -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 {