mirror of
https://github.com/moparisthebest/Yaaic
synced 2024-11-22 17:02:21 -05:00
Implemented onQuit() event for other users
This commit is contained in:
parent
608ea2e614
commit
218b2a8ed5
@ -362,7 +362,22 @@ public class IRCConnection extends PircBot
|
||||
{
|
||||
debug("Quit", sourceNick);
|
||||
|
||||
// XXX: Add message to all channels where this user has been
|
||||
if (!sourceNick.equals(this.getNick())) {
|
||||
for (String target : getChannelsByNickname(sourceNick)) {
|
||||
Channel channel = server.getChannel(target);
|
||||
Message message = new Message(sourceNick + " quitted");
|
||||
message.setColor(Message.COLOR_GREEN);
|
||||
message.setIcon(R.drawable.quit);
|
||||
channel.addMessage(message);
|
||||
|
||||
Intent intent = new Intent(Broadcast.CHANNEL_MESSAGE);
|
||||
intent.putExtra(Broadcast.EXTRA_SERVER, server.getId());
|
||||
intent.putExtra(Broadcast.EXTRA_CHANNEL, target);
|
||||
service.sendBroadcast(intent);
|
||||
}
|
||||
} else {
|
||||
// XXX: We quitted
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user