~emersion/soju-dev

Skip list/type A mode arguments v1 APPLIED

Hubert Hirtz: 1
 Skip list/type A mode arguments

 1 files changed, 3 insertions(+), 1 deletions(-)
Pushed, thanks!
Export patchset (mbox)
How do I use this?

Copy & paste the following snippet into your terminal to import this patchset into git:

curl -s https://lists.sr.ht/~emersion/soju-dev/patches/26184/mbox | git am -3
Learn more about email & git
View this thread in the archives

[RFC PATCH] Skip list/type A mode arguments Export this patch

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.

---

Notice:
I will test this patch soon...
 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
-- 
2.33.1