mirror of
https://github.com/moparisthebest/Yaaic
synced 2024-12-23 16:08:48 -05:00
Implemented channel events: onSetChannelKey() onRemoveChannelKey()
This commit is contained in:
parent
eb150c52e0
commit
45a2ca0849
@ -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
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user