logic fixes
This commit is contained in:
parent
d1840ef508
commit
0109d921ac
|
@ -201,12 +201,24 @@ def get_transport_name_from_jid(jid, use_config_setting = True):
|
||||||
return 'weather'
|
return 'weather'
|
||||||
elif host.startswith('yahoo'):
|
elif host.startswith('yahoo'):
|
||||||
return 'yahoo'
|
return 'yahoo'
|
||||||
|
else:
|
||||||
|
return None
|
||||||
|
|
||||||
def jid_is_transport(jid):
|
def jid_is_transport(jid):
|
||||||
is_transport = jid.startswith('aim') or jid.startswith('gadugadu') or\
|
aim = jid.startswith('aim')
|
||||||
jid.startswith('irc') or jid.startswith('icq') or\
|
gg = jid.startswith('gadugadu')
|
||||||
jid.startswith('msn') or jid.startswith('sms') or\
|
irc = jid.startswith('irc')
|
||||||
jid.startswith('yahoo')
|
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):
|
def get_jid_from_account(account_name):
|
||||||
name = config.get_per('accounts', account_name, 'name')
|
name = config.get_per('accounts', account_name, 'name')
|
||||||
|
|
Loading…
Reference in New Issue