2006-01-25 dust

* Fix IRC client proxy to use ISO-8859-1.
This commit is contained in:
dust
2006-01-25 15:34:28 +00:00
committed by zzz
parent 17eb7fa983
commit ab8e11657f
3 changed files with 14 additions and 11 deletions

View File

@ -125,10 +125,10 @@ public class I2PTunnelIRCClient extends I2PTunnelClientBase implements Runnable
}
public void run() {
InputStream input;
BufferedReader in;
OutputStream output;
try {
input=remote.getInputStream();
in = new BufferedReader(new InputStreamReader(remote.getInputStream(), "ISO-8859-1"));
output=local.getOutputStream();
} catch (IOException e) {
if (_log.shouldLog(Log.ERROR))
@ -141,7 +141,7 @@ public class I2PTunnelIRCClient extends I2PTunnelClientBase implements Runnable
while(true)
{
try {
String inmsg = DataHelper.readLine(input);
String inmsg = in.readLine();
if(inmsg==null)
break;
if(inmsg.endsWith("\r"))
@ -159,7 +159,7 @@ public class I2PTunnelIRCClient extends I2PTunnelClientBase implements Runnable
_log.info("inbound: "+outmsg);
}
outmsg=outmsg+"\n";
output.write(outmsg.getBytes());
output.write(outmsg.getBytes("ISO-8859-1"));
} else {
if (_log.shouldLog(Log.WARN))
_log.warn("inbound BLOCKED: "+inmsg);
@ -195,10 +195,10 @@ public class I2PTunnelIRCClient extends I2PTunnelClientBase implements Runnable
}
public void run() {
InputStream input;
BufferedReader in;
OutputStream output;
try {
input=local.getInputStream();
in = new BufferedReader(new InputStreamReader(local.getInputStream(), "ISO-8859-1"));
output=remote.getOutputStream();
} catch (IOException e) {
if (_log.shouldLog(Log.ERROR))
@ -211,7 +211,7 @@ public class I2PTunnelIRCClient extends I2PTunnelClientBase implements Runnable
while(true)
{
try {
String inmsg = DataHelper.readLine(input);
String inmsg = in.readLine();
if(inmsg==null)
break;
if(inmsg.endsWith("\r"))
@ -229,7 +229,7 @@ public class I2PTunnelIRCClient extends I2PTunnelClientBase implements Runnable
_log.info("outbound: "+outmsg);
}
outmsg=outmsg+"\n";
output.write(outmsg.getBytes());
output.write(outmsg.getBytes("ISO-8859-1"));
} else {
if (_log.shouldLog(Log.WARN))
_log.warn("outbound BLOCKED: "+"\""+inmsg+"\"");

View File

@ -1,4 +1,7 @@
$Id: history.txt,v 1.393 2006/01/19 23:40:24 complication Exp $
$Id: history.txt,v 1.394 2006/01/22 19:51:57 jrandom Exp $
2006-01-25 dust
* Fix IRC client proxy to use ISO-8859-1.
2006-01-22 jrandom
* New tunnel build process - does not use the new crypto or new peer

View File

@ -15,9 +15,9 @@ import net.i2p.CoreVersion;
*
*/
public class RouterVersion {
public final static String ID = "$Revision: 1.337 $ $Date: 2006/01/19 23:40:25 $";
public final static String ID = "$Revision: 1.338 $ $Date: 2006/01/22 19:51:56 $";
public final static String VERSION = "0.6.1.9";
public final static long BUILD = 6;
public final static long BUILD = 7;
public static void main(String args[]) {
System.out.println("I2P Router version: " + VERSION + "-" + BUILD);
System.out.println("Router ID: " + RouterVersion.ID);