From 80f689b2fa6ac0b662a3e8f52a80b1cebb555e21 Mon Sep 17 00:00:00 2001 From: mathieui Date: Mon, 28 Jan 2013 19:34:53 +0100 Subject: Do not open new useless tabs with /message --- src/core.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/core.py b/src/core.py index dc47c003..6a17a7c1 100644 --- a/src/core.py +++ b/src/core.py @@ -2304,7 +2304,11 @@ class Core(object): jid = safeJID(args[0]) if not jid.user and not jid.domain and not jid.resource: return self.information('Invalid JID.', 'Error') - tab = self.open_conversation_window(jid.full, focus=True) + tab = self.get_conversation_by_jid(jid.full, False) + if not tab: + tab = self.open_conversation_window(jid.full, focus=True) + else: + self.focus_tab_named(tab.get_name()) if len(args) > 1: tab.command_say(args[1]) -- cgit v1.2.3