From 2d585d6a72ef4213ef84376d77c30ec9104adac3 Mon Sep 17 00:00:00 2001 From: Sebastian Kaspari Date: Sun, 14 Mar 2010 01:06:06 +0100 Subject: [PATCH] Also update query if a user exists --- src/org/yaaic/irc/IRCConnection.java | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/org/yaaic/irc/IRCConnection.java b/src/org/yaaic/irc/IRCConnection.java index 50f6000..d740fcd 100644 --- a/src/org/yaaic/irc/IRCConnection.java +++ b/src/org/yaaic/irc/IRCConnection.java @@ -487,6 +487,22 @@ public class IRCConnection extends PircBot intent.putExtra(Broadcast.EXTRA_CONVERSATION, target); service.sendBroadcast(intent); } + + // Look if there's a query to update + Conversation conversation = server.getConversation(sourceNick); + + if (conversation != null) { + Message message = new Message(sourceNick + " quitted (" + reason + ")"); + message.setColor(Message.COLOR_GREEN); + message.setIcon(R.drawable.quit); + conversation.addMessage(message); + + Intent intent = new Intent(Broadcast.CONVERSATION_MESSAGE); + intent.putExtra(Broadcast.EXTRA_SERVER, server.getId()); + intent.putExtra(Broadcast.EXTRA_CONVERSATION, conversation.getName()); + service.sendBroadcast(intent); + } + } else { // XXX: We quitted }