From 876b96c3580089ea8b2472a8a9bdfd528789f42c Mon Sep 17 00:00:00 2001 From: Sebastian Kaspari Date: Mon, 15 Mar 2010 23:52:32 +0100 Subject: [PATCH] Implemented IRC events: onSetChannelLimit() onRemoveChannelLimit() --- src/org/yaaic/irc/IRCConnection.java | 34 ++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/src/org/yaaic/irc/IRCConnection.java b/src/org/yaaic/irc/IRCConnection.java index c2cd8ce..72ccf67 100644 --- a/src/org/yaaic/irc/IRCConnection.java +++ b/src/org/yaaic/irc/IRCConnection.java @@ -635,6 +635,40 @@ public class IRCConnection extends PircBot Broadcast.createConversationIntent(Broadcast.CONVERSATION_MESSAGE, server.getId(), target) ); } + + /** + * On set channel limit + */ + @Override + protected void onSetChannelLimit(String target, String sourceNick, String sourceLogin, String sourceHostname, int limit) + { + debug("onSetChannelLimit", sourceNick + " " + target); + + Message message = new Message(sourceNick + " sets limit: " + limit); + message.setColor(Message.COLOR_BLUE); + server.getConversation(target).addMessage(message); + + service.sendBroadcast( + Broadcast.createConversationIntent(Broadcast.CONVERSATION_MESSAGE, server.getId(), target) + ); + } + + /** + * On remove channel limit + */ + @Override + protected void onRemoveChannelLimit(String target, String sourceNick, String sourceLogin, String sourceHostname) + { + debug("onRemoveChannelLimit", sourceNick + " " + target); + + Message message = new Message(sourceNick + " removes limit"); + message.setColor(Message.COLOR_BLUE); + server.getConversation(target).addMessage(message); + + service.sendBroadcast( + Broadcast.createConversationIntent(Broadcast.CONVERSATION_MESSAGE, server.getId(), target) + ); + } /** * On unknown