~emersion/soju-dev

This thread contains a patchset. You're looking at the original emails, but you may wish to use the patch review UI. Review patch
2 2

[RFC PATCH] Skip list/type A mode arguments

Details
Message ID
<20211103194818.7711-1-hubert@hirtz.pm>
DKIM signature
pass
Download raw message
Patch: +3 -1
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
Details
Message ID
<04dab1471ef27c6c6a791738ea539210@dille.cc>
In-Reply-To
<20211103194818.7711-1-hubert@hirtz.pm> (view parent)
DKIM signature
pass
Download raw message
> Notice:
> I will test this patch soon...
Tested on my machine with the message below. It works! LGTM.

MODE #sava/ergo +bv chat!*@* chien
Details
Message ID
<QM0WwtxmM84-wteSc8u2XQLgeahl3IWa2iDotzz3KC0wkly2_YKgRzFX0DeYKGntNiKVGROD2A_MqyhyKl6cm3m9cdWOQMpMbsfg70g4X3c=@emersion.fr>
In-Reply-To
<04dab1471ef27c6c6a791738ea539210@dille.cc> (view parent)
DKIM signature
pass
Download raw message
Pushed, thanks!
Reply to thread Export thread (mbox)