1
0
mirror of https://github.com/moparisthebest/Yaaic synced 2024-11-22 17:02:21 -05:00

Implemented IRCConnection.onPart()

This commit is contained in:
Sebastian Kaspari 2010-03-02 19:54:34 +01:00
parent 8432a6ad4d
commit 9d1410b8e2

View File

@ -213,9 +213,18 @@ public class IRCConnection extends PircBot
* On Part * On Part
*/ */
@Override @Override
protected void onPart(String channel, String sender, String login, String hostname) protected void onPart(String target, String sender, String login, String hostname)
{ {
debug("Part", channel + " " + sender); debug("Part", target + " " + sender);
if (sender.equals(getNick())) {
// We pareted a channel
server.removeChannel(target);
service.sendBroadcast(new Intent(Broadcast.CHANNEL_REMOVE));
} else {
server.getChannel(target).addMessage(sender + " parted");
service.sendBroadcast(new Intent(Broadcast.CHANNEL_MESSAGE));
}
} }
/** /**