1
0
mirror of https://github.com/moparisthebest/Yaaic synced 2024-11-23 01:12:17 -05:00

PircBot Patch: Fixed parsing NICK messages without hostmasks - fixes issue 8

This commit is contained in:
Sebastian Kaspari 2010-04-17 22:46:46 +02:00
parent 17c11c2c9a
commit 482a0bc7b5

View File

@ -235,7 +235,8 @@ public abstract class PircBot implements ReplyConstants {
} }
this.setNick(nick); this.setNick(nick);
} }
// XXX: PircBot patch - We are not connected to server if nothing received
if (line == null) { if (line == null) {
throw new IOException("Could not connect to server"); 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) // (or maybe a NOTICE or suchlike from the server)
sourceNick = senderInfo; sourceNick = senderInfo;
target = token; 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 { else {