I2P Address: [http://git.idk.i2p]

Skip to content
Snippets Groups Projects
Commit 3acfdbe8 authored by zzz's avatar zzz
Browse files

i2ptunnel IRC client: Do not filter server PING or client PONG (ticket #1141)

parent d9fed57c
No related branches found
No related tags found
No related merge requests found
...@@ -39,7 +39,7 @@ abstract class IRCFilter { ...@@ -39,7 +39,7 @@ abstract class IRCFilter {
final String[] allowedCommands = final String[] allowedCommands =
{ {
// "NOTICE", // can contain CTCP // "NOTICE", // can contain CTCP
//"PING", "PING",
//"PONG", //"PONG",
"MODE", "MODE",
"JOIN", "JOIN",
...@@ -76,8 +76,6 @@ abstract class IRCFilter { ...@@ -76,8 +76,6 @@ abstract class IRCFilter {
} catch(NumberFormatException nfe){} } 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)) { if ("PONG".equals(command)) {
// Turn the received ":irc.freshcoffee.i2p PONG irc.freshcoffee.i2p :127.0.0.1" // 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 // 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 { ...@@ -175,7 +173,7 @@ abstract class IRCFilter {
// "PART", // replace with filtered PART to hide client part messages // "PART", // replace with filtered PART to hide client part messages
"PASS", "PASS",
// "PING", // "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 // "QUIT", // replace with a filtered QUIT to hide client quit messages
"RULES", "RULES",
"SETNAME", "SETNAME",
...@@ -291,8 +289,6 @@ abstract class IRCFilter { ...@@ -291,8 +289,6 @@ abstract class IRCFilter {
return rv; 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 // Allow all allowedCommands
if (_allowedOutbound.contains(command)) if (_allowedOutbound.contains(command))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment