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