1
0
mirror of https://github.com/moparisthebest/Yaaic synced 2024-11-26 10:52:16 -05:00

Implemented IRC events: onSetSecret() onRemoveSecret()

This commit is contained in:
Sebastian Kaspari 2010-03-15 23:48:44 +01:00
parent 89ebe3e284
commit b201a93adc

View File

@ -593,7 +593,41 @@ public class IRCConnection extends PircBot
{ {
debug("onSetChannelKey", target + " " + sourceNick + " " + key); debug("onSetChannelKey", target + " " + sourceNick + " " + key);
Message message = new Message(sourceNick + " set channel key: " + key); Message message = new Message(sourceNick + " sets channel key: " + key);
message.setColor(Message.COLOR_BLUE);
server.getConversation(target).addMessage(message);
service.sendBroadcast(
Broadcast.createConversationIntent(Broadcast.CONVERSATION_MESSAGE, server.getId(), target)
);
}
/**
* On set secret
*/
@Override
protected void onSetSecret(String target, String sourceNick, String sourceLogin, String sourceHostname)
{
debug("onSetSecret", sourceNick + " " + target);
Message message = new Message(sourceNick + " sets channel secret");
message.setColor(Message.COLOR_BLUE);
server.getConversation(target).addMessage(message);
service.sendBroadcast(
Broadcast.createConversationIntent(Broadcast.CONVERSATION_MESSAGE, server.getId(), target)
);
}
/**
* On remove secret
*/
@Override
protected void onRemoveSecret(String target, String sourceNick, String sourceLogin, String sourceHostname)
{
debug("onRemoveSecret", sourceNick + " " + target);
Message message = new Message(sourceNick + " sets channel public");
message.setColor(Message.COLOR_BLUE); message.setColor(Message.COLOR_BLUE);
server.getConversation(target).addMessage(message); server.getConversation(target).addMessage(message);