From 7fbaaefc9c184174f32cc2ccbea4cacda8cc033b Mon Sep 17 00:00:00 2001 From: Hubert Hirtz Date: Wed, 3 Nov 2021 20:48:18 +0100 Subject: [PATCH] Skip list/type A mode arguments Type-A modes always have an argument[0], but soju doesn't care about them since it doesn't keep track of mode lists (ban/invite/.. lists). [0] https://modern.ircdocs.horse/#mode-message > Type A: Modes that add or remove an address to or from a list. These > modes MUST always have a parameter when sent from the server to a > client. --- irc.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/irc.go b/irc.go index 83cbdc1..ae3ff47 100644 --- a/irc.go +++ b/irc.go @@ -145,7 +145,9 @@ outer: if !ok { continue } - if mt == modeTypeB || (mt == modeTypeC && plusMinus == '+') { + if mt == modeTypeA { + nextArgument++ + } else if mt == modeTypeB || (mt == modeTypeC && plusMinus == '+') { if plusMinus == '+' { var argument string // some sentitive arguments (such as channel keys) can be omitted for privacy