From 3acfdbe8f7f15ebf211e1b5ac203c446e503397a Mon Sep 17 00:00:00 2001 From: zzz <zzz@mail.i2p> Date: Fri, 6 Dec 2013 15:26:12 +0000 Subject: [PATCH] i2ptunnel IRC client: Do not filter server PING or client PONG (ticket #1141) --- .../java/src/net/i2p/i2ptunnel/irc/IRCFilter.java | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) 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 a995285f42..766e20b1c0 100644 --- a/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/irc/IRCFilter.java +++ b/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/irc/IRCFilter.java @@ -39,7 +39,7 @@ abstract class IRCFilter { final String[] allowedCommands = { // "NOTICE", // can contain CTCP - //"PING", + "PING", //"PONG", "MODE", "JOIN", @@ -76,8 +76,6 @@ abstract class IRCFilter { } catch(NumberFormatException nfe){} - if ("PING".equals(command)) - return "PING 127.0.0.1"; // no way to know what the ircd to i2ptunnel server con is, so localhost works if ("PONG".equals(command)) { // Turn the received ":irc.freshcoffee.i2p PONG irc.freshcoffee.i2p :127.0.0.1" // into ":127.0.0.1 PONG 127.0.0.1 " so that the caller can append the client's extra parameter @@ -175,7 +173,7 @@ abstract class IRCFilter { // "PART", // replace with filtered PART to hide client part messages "PASS", // "PING", - // "PONG", // replaced with a filtered PING/PONG since some clients send the server IP (thanks aardvax!) + "PONG", // "QUIT", // replace with a filtered QUIT to hide client quit messages "RULES", "SETNAME", @@ -291,8 +289,6 @@ abstract class IRCFilter { return rv; } - if ("PONG".equals(command)) - return "PONG 127.0.0.1"; // no way to know what the ircd to i2ptunnel server con is, so localhost works // Allow all allowedCommands if (_allowedOutbound.contains(command)) -- GitLab