From 0109d921ac903273f94d80f84b6403143a824c64 Mon Sep 17 00:00:00 2001 From: Nikos Kouremenos Date: Mon, 24 Oct 2005 14:32:13 +0000 Subject: [PATCH] logic fixes --- src/common/gajim.py | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/src/common/gajim.py b/src/common/gajim.py index 5e37f8a09..b4069e78c 100644 --- a/src/common/gajim.py +++ b/src/common/gajim.py @@ -201,12 +201,24 @@ def get_transport_name_from_jid(jid, use_config_setting = True): return 'weather' elif host.startswith('yahoo'): return 'yahoo' + else: + return None def jid_is_transport(jid): - is_transport = jid.startswith('aim') or jid.startswith('gadugadu') or\ - jid.startswith('irc') or jid.startswith('icq') or\ - jid.startswith('msn') or jid.startswith('sms') or\ - jid.startswith('yahoo') + aim = jid.startswith('aim') + gg = jid.startswith('gadugadu') + irc = jid.startswith('irc') + icq = jid.startswith('icq') + msn = jid.startswith('msn') + sms = jid.startswith('sms') + yahoo = jid.startswith('yahoo') + + if aim or gg or irc or icq or msn or sms or yahoo: + is_transport = True + else: + is_transport = False + + return is_transport def get_jid_from_account(account_name): name = config.get_per('accounts', account_name, 'name')