From f40480d773175f7f2fee50bc50e2306d0c1c6e7d Mon Sep 17 00:00:00 2001 From: Sebastian Kaspari Date: Thu, 18 Mar 2010 19:48:11 +0100 Subject: [PATCH] Implemented IRC events: onSetModerated() onRemoveModerated() --- 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 e96a2be..dd9aa52 100644 --- a/src/org/yaaic/irc/IRCConnection.java +++ b/src/org/yaaic/irc/IRCConnection.java @@ -812,6 +812,40 @@ public class IRCConnection extends PircBot ); } + /** + * On set moderated + */ + @Override + protected void onSetModerated(String target, String sourceNick, String sourceLogin, String sourceHostname) + { + debug("onSetModerated", sourceNick + " " + target); + + Message message = new Message(sourceNick + " sets moderated"); + message.setColor(Message.COLOR_BLUE); + server.getConversation(target).addMessage(message); + + service.sendBroadcast( + Broadcast.createConversationIntent(Broadcast.CONVERSATION_MESSAGE, server.getId(), target) + ); + } + + /** + * On remove moderated + */ + @Override + protected void onRemoveModerated(String target, String sourceNick, String sourceLogin, String sourceHostname) + { + debug("onRemoveModerated", sourceNick + " " + target); + + Message message = new Message(sourceNick + " removes moderated"); + message.setColor(Message.COLOR_BLUE); + server.getConversation(target).addMessage(message); + + service.sendBroadcast( + Broadcast.createConversationIntent(Broadcast.CONVERSATION_MESSAGE, server.getId(), target) + ); + } + /** * On unknown */