From 62b18b18b5fc81b99e569b7621953fb80205ea8c Mon Sep 17 00:00:00 2001 From: zzz Date: Sun, 30 Dec 2007 03:45:09 +0000 Subject: [PATCH] 2007-12-29 zzz * Tweak IRC inbound PONG filtering to fix xchat/BitchX lagometers --- .../src/net/i2p/i2ptunnel/I2PTunnelIRCClient.java | 15 ++++++++++----- history.txt | 3 ++- router/java/src/net/i2p/router/RouterVersion.java | 4 ++-- 3 files changed, 14 insertions(+), 8 deletions(-) diff --git a/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/I2PTunnelIRCClient.java b/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/I2PTunnelIRCClient.java index fa3f67258..2e85057c4 100644 --- a/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/I2PTunnelIRCClient.java +++ b/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/I2PTunnelIRCClient.java @@ -315,7 +315,10 @@ public class I2PTunnelIRCClient extends I2PTunnelClientBase implements Runnable // be great if irc clients actually followed the RFCs here, but i guess thats too much to ask. // If we haven't PINGed them, or the PING we sent isn't something we know how to filter, this // is blank. - String pong = expectedPong.length() > 0 ? expectedPong.toString() : null; + // + // String pong = expectedPong.length() > 0 ? expectedPong.toString() : null; + // If we aren't going to rewrite it, pass it through + String pong = expectedPong.length() > 0 ? expectedPong.toString() : s; expectedPong.setLength(0); return pong; } @@ -402,13 +405,15 @@ public class I2PTunnelIRCClient extends I2PTunnelClientBase implements Runnable expectedPong.setLength(0); if (field.length == 1) { // PING rv = "PING"; - expectedPong.append("PONG 127.0.0.1"); + // If we aren't rewriting the PING don't rewrite the PONG + // expectedPong.append("PONG 127.0.0.1"); } else if (field.length == 2) { // PING nonce rv = "PING " + field[1]; - expectedPong.append("PONG ").append(field[1]); + // If we aren't rewriting the PING don't rewrite the PONG + // expectedPong.append("PONG ").append(field[1]); } else if (field.length == 3) { // PING nonce serverLocation rv = "PING " + field[1]; - expectedPong.append("PONG ").append(field[1]); + expectedPong.append("PONG ").append(field[2]).append(" :").append(field[1]); // PONG serverLocation nonce } else { if (_log.shouldLog(Log.ERROR)) _log.error("IRC client sent a PING we don't understand, filtering it (\"" + s + "\")"); @@ -416,7 +421,7 @@ public class I2PTunnelIRCClient extends I2PTunnelClientBase implements Runnable } if (_log.shouldLog(Log.WARN)) - _log.warn("sending ping " + rv + ", waiting for " + expectedPong + " orig was [" + s + "]"); + _log.warn("sending ping [" + rv + "], waiting for [" + expectedPong + "] orig was [" + s + "]"); return rv; } diff --git a/history.txt b/history.txt index 7e28cc70b..4bfda63fb 100644 --- a/history.txt +++ b/history.txt @@ -1,6 +1,7 @@ -$Id: history.txt,v 1.607 2007-12-29 17:15:14 zzz Exp $ +$Id: history.txt,v 1.608 2007-12-29 18:59:26 zzz Exp $ 2007-12-29 zzz + * Tweak IRC inbound PONG filtering to fix xchat/BitchX lagometers * Allow commas in router.trustedUpdateKeys and router.updateURL again * Change default news host from dev.i2p.net to dev.i2p * Change jetty timeout from 30 to 60 sec (thanks sponge!) diff --git a/router/java/src/net/i2p/router/RouterVersion.java b/router/java/src/net/i2p/router/RouterVersion.java index e8e10890a..59c1b21ee 100644 --- a/router/java/src/net/i2p/router/RouterVersion.java +++ b/router/java/src/net/i2p/router/RouterVersion.java @@ -15,9 +15,9 @@ import net.i2p.CoreVersion; * */ public class RouterVersion { - public final static String ID = "$Revision: 1.542 $ $Date: 2007-12-29 17:15:11 $"; + public final static String ID = "$Revision: 1.543 $ $Date: 2007-12-29 18:59:24 $"; public final static String VERSION = "0.6.1.30"; - public final static long BUILD = 14; + public final static long BUILD = 15; public static void main(String args[]) { System.out.println("I2P Router version: " + VERSION + "-" + BUILD); System.out.println("Router ID: " + RouterVersion.ID);