custom_host can have a value even if we don't use it, and it should not be shown

This commit is contained in:
Yann Leboulanger 2005-09-12 06:27:20 +00:00
parent 74cc23031c
commit c3b701ca8e
1 changed files with 3 additions and 4 deletions

View File

@ -201,8 +201,7 @@ def get_jid_from_account(account_name):
def get_hostname_from_account(account_name):
'''returns hostname (if custom hostname is used, that is returned)'''
hostname = config.get_per('accounts', account_name, 'custom_host')
if hostname == '':
hostname = config.get_per('accounts', account_name, 'hostname')
return hostname
if config.get_per('accounts', account_name, 'use_custom_host'):
return config.get_per('accounts', account_name, 'custom_host')
return config.get_per('accounts', account_name, 'hostname')