From 608ea2e614cb6c0da9570f97a1550f1d96394c6e Mon Sep 17 00:00:00 2001 From: Sebastian Kaspari Date: Tue, 9 Mar 2010 22:41:01 +0100 Subject: [PATCH] Pircbot Patch: Call onQuit() before removing the user. Otherwise we do not know which channels the user was on --- src/org/jibble/pircbot/PircBot.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/org/jibble/pircbot/PircBot.java b/src/org/jibble/pircbot/PircBot.java index 96b9c42..e1422c2 100644 --- a/src/org/jibble/pircbot/PircBot.java +++ b/src/org/jibble/pircbot/PircBot.java @@ -1026,13 +1026,17 @@ public abstract class PircBot implements ReplyConstants { } else if (command.equals("QUIT")) { // Someone has quit from the IRC server. + + // XXX: Pircbot Patch - Call onQuit before removing the user. This way we + // are able to know which channels the user was on. + this.onQuit(sourceNick, sourceLogin, sourceHostname, line.substring(line.indexOf(" :") + 2)); + if (sourceNick.equals(this.getNick())) { this.removeAllChannels(); } else { this.removeUser(sourceNick); } - this.onQuit(sourceNick, sourceLogin, sourceHostname, line.substring(line.indexOf(" :") + 2)); } else if (command.equals("KICK")) { // Somebody has been kicked from a channel.