Implemented IRC events: onSetTopicProtection() onRemoveTopicProtection()

This commit is contained in:
Sebastian Kaspari 2010-03-18 19:41:38 +01:00
parent 438a7e5d3e
commit 8d8e3691a4
1 changed files with 34 additions and 0 deletions

View File

@ -709,6 +709,40 @@ public class IRCConnection extends PircBot
Broadcast.createConversationIntent(Broadcast.CONVERSATION_MESSAGE, server.getId(), target)
);
}
/**
* On set topic protection
*/
@Override
protected void onSetTopicProtection(String target, String sourceNick, String sourceLogin, String sourceHostname)
{
debug("onSetTopicProtection", sourceNick + " " + target);
Message message = new Message(sourceNick + " sets topic protection");
message.setColor(Message.COLOR_BLUE);
server.getConversation(target).addMessage(message);
service.sendBroadcast(
Broadcast.createConversationIntent(Broadcast.CONVERSATION_MESSAGE, server.getId(), target)
);
}
/**
* On remove topic protection
*/
@Override
protected void onRemoveTopicProtection(String target, String sourceNick, String sourceLogin, String sourceHostname)
{
debug("onRemoveTopicProtection", sourceNick + " " + target);
Message message = new Message(sourceNick + " removes topic protection");
message.setColor(Message.COLOR_BLUE);
server.getConversation(target).addMessage(message);
service.sendBroadcast(
Broadcast.createConversationIntent(Broadcast.CONVERSATION_MESSAGE, server.getId(), target)
);
}
/**
* On unknown