1
0
mirror of https://github.com/moparisthebest/Yaaic synced 2024-11-26 02:42:16 -05:00

PircBot Patch: Parse nicknames without host part (bugfix for irssi proxy)

This commit is contained in:
Sebastian Kaspari 2011-02-09 00:42:05 +01:00
parent f6a518462c
commit 8c5258710f

View File

@ -916,6 +916,12 @@ public abstract class PircBot implements ReplyConstants {
sourceNick = senderInfo; sourceNick = senderInfo;
target = token; target = token;
// XXX: PircBot Patch - Sometimes there are senderinfos with an ident but no host
if (sourceNick.contains("!") && !sourceNick.contains("@")) {
String[] chunks = sourceNick.split("!");
sourceNick = chunks[0]; // Use the part before the exclamation mark
}
// XXX: PircBot Patch - (Needed for BIP IRC Proxy) // XXX: PircBot Patch - (Needed for BIP IRC Proxy)
// If this is a NICK command, use next token as target // If this is a NICK command, use next token as target
if (command.equalsIgnoreCase("nick")) { if (command.equalsIgnoreCase("nick")) {