From 482a0bc7b59c02c3645f572fca44a035005c889b Mon Sep 17 00:00:00 2001 From: Sebastian Kaspari Date: Sat, 17 Apr 2010 22:46:46 +0200 Subject: [PATCH] PircBot Patch: Fixed parsing NICK messages without hostmasks - fixes issue 8 --- src/org/jibble/pircbot/PircBot.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/org/jibble/pircbot/PircBot.java b/src/org/jibble/pircbot/PircBot.java index b9961ba..7dda596 100644 --- a/src/org/jibble/pircbot/PircBot.java +++ b/src/org/jibble/pircbot/PircBot.java @@ -235,7 +235,8 @@ public abstract class PircBot implements ReplyConstants { } this.setNick(nick); } - + + // XXX: PircBot patch - We are not connected to server if nothing received if (line == null) { throw new IOException("Could not connect to server"); } @@ -902,6 +903,12 @@ public abstract class PircBot implements ReplyConstants { // (or maybe a NOTICE or suchlike from the server) sourceNick = senderInfo; target = token; + + // XXX: PircBot Patch - (Needed for BIP IRC Proxy) + // If this is a JOIN command, use next token as target + if (command.equalsIgnoreCase("nick")) { + target = tokenizer.nextToken(); + } } } else {