1
0
mirror of https://github.com/moparisthebest/Yaaic synced 2024-08-13 16:53:50 -04:00

Implemented channel events: onSetChannelKey() onRemoveChannelKey()

This commit is contained in:
Sebastian Kaspari 2010-03-14 22:22:51 +01:00
parent eb150c52e0
commit 45a2ca0849

View File

@ -565,6 +565,40 @@ public class IRCConnection extends PircBot
service.sendBroadcast(intent);
}
/**
* On remove channel key
*/
@Override
protected void onRemoveChannelKey(String target, String sourceNick, String sourceLogin, String sourceHostname, String key)
{
debug("onRemoveChannelKey", target + " " + sourceNick + " " + key);
Message message = new Message(sourceNick + " removes channel key");
message.setColor(Message.COLOR_BLUE);
server.getConversation(target).addMessage(message);
service.sendBroadcast(
Broadcast.createConversationIntent(Broadcast.CONVERSATION_MESSAGE, server.getId(), target)
);
}
/**
* On set channel key
*/
@Override
protected void onSetChannelKey(String target, String sourceNick, String sourceLogin, String sourceHostname, String key)
{
debug("onSetChannelKey", target + " " + sourceNick + " " + key);
Message message = new Message(sourceNick + " set channel key: " + key);
message.setColor(Message.COLOR_BLUE);
server.getConversation(target).addMessage(message);
service.sendBroadcast(
Broadcast.createConversationIntent(Broadcast.CONVERSATION_MESSAGE, server.getId(), target)
);
}
/**
* On unknown
*/