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.
This commit is contained in:
Hubert Hirtz 2021-11-03 20:48:18 +01:00 committed by Simon Ser
parent c2047dc1a8
commit 7fbaaefc9c

4
irc.go
View file

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