From 9e18bded7b8da5660f28d68afd0c83292a0272e4 Mon Sep 17 00:00:00 2001 From: zzz <zzz@i2pmail.org> Date: Thu, 23 May 2024 08:59:48 -0400 Subject: [PATCH] i2ptunnel: Fix CTCP ACTION (Gitlab #481) aka /me ... inadvertently filtered, broken by changes for IRCv3 was blocked in both directions, so both sending and receiving client need this fix for it to get through --- apps/i2ptunnel/java/src/net/i2p/i2ptunnel/irc/IRCFilter.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/irc/IRCFilter.java b/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/irc/IRCFilter.java index 6864e3392d..26c6cce14b 100644 --- a/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/irc/IRCFilter.java +++ b/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/irc/IRCFilter.java @@ -114,6 +114,8 @@ abstract class IRCFilter { { String msg; msg = field[idx++]; + if (idx < field.length) + msg += ' ' + field[idx]; if(msg.indexOf(0x01) >= 0) // CTCP marker ^A can be anywhere, not just immediately after the ':' { @@ -360,6 +362,8 @@ abstract class IRCFilter { if (field.length < idx + 2) return s; // invalid, allow server response String msg = field[idx + 1]; + if (idx + 2 < field.length) + msg += ' ' + field[idx + 2]; if(msg.indexOf(0x01) >= 0) // CTCP marker ^A can be anywhere, not just immediately after the ':' { -- GitLab