예제 #1
0
파일: gajim.py 프로젝트: kevin-teddy/gajim
def get_hostname_from_account(account_name, use_srv=False):
    """returns hostname (if custom hostname is used, that is returned)"""
    if use_srv and connections[account_name].connected_hostname:
        return connections[account_name].connected_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")
예제 #2
0
파일: gajim.py 프로젝트: tdruiva/gajim
def get_hostname_from_account(account_name, use_srv=False):
    '''returns hostname (if custom hostname is used, that is returned)'''
    if use_srv and connections[account_name].connected_hostname:
        return connections[account_name].connected_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')
예제 #3
0
파일: gajim.py 프로젝트: pacoqueen/bbinn
def get_hostname_from_account(account_name, use_srv = False):
	'''returns hostname (if custom hostname is used, that is returned)'''
	if use_srv and connections[account_name].connected_hostname:
		return connections[account_name].connected_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')
예제 #4
0
파일: gajim.py 프로젝트: jabber-at/gajim
def get_jid_from_account(account_name):
    """
    Return the jid we use in the given account
    """
    name = config.get_per('accounts', account_name, 'name')
    hostname = config.get_per('accounts', account_name, 'hostname')
    jid = name + '@' + hostname
    return jid
예제 #5
0
파일: gajim.py 프로젝트: tdruiva/gajim
def get_priority(account, show):
    '''return the priority an account must have'''
    if not show:
        show = 'online'

    if show in ('online', 'chat', 'away', 'xa', 'dnd', 'invisible') and \
    config.get_per('accounts', account, 'adjust_priority_with_status'):
        return config.get_per('accounts', account, 'autopriority_' + show)
    return config.get_per('accounts', account, 'priority')
예제 #6
0
파일: gajim.py 프로젝트: kevin-teddy/gajim
def get_priority(account, show):
    """return the priority an account must have"""
    if not show:
        show = "online"

    if show in ("online", "chat", "away", "xa", "dnd", "invisible") and config.get_per(
        "accounts", account, "adjust_priority_with_status"
    ):
        return config.get_per("accounts", account, "autopriority_" + show)
    return config.get_per("accounts", account, "priority")
예제 #7
0
파일: gajim.py 프로젝트: jabber-at/gajim
def get_priority(account, show):
    """
    Return the priority an account must have
    """
    if not show:
        show = 'online'

    if show in ('online', 'chat', 'away', 'xa', 'dnd', 'invisible') and \
    config.get_per('accounts', account, 'adjust_priority_with_status'):
        return config.get_per('accounts', account, 'autopriority_' + show)
    return config.get_per('accounts', account, 'priority')
예제 #8
0
파일: gajim.py 프로젝트: jabber-at/gajim
def zeroconf_is_connected():
    return account_is_connected(ZEROCONF_ACC_NAME) and \
            config.get_per('accounts', ZEROCONF_ACC_NAME, 'is_zeroconf')
예제 #9
0
파일: gajim.py 프로젝트: tdruiva/gajim
def get_jid_from_account(account_name):
    '''return the jid we use in the given account'''
    name = config.get_per('accounts', account_name, 'name')
    hostname = config.get_per('accounts', account_name, 'hostname')
    jid = name + '@' + hostname
    return jid
예제 #10
0
파일: gajim.py 프로젝트: tdruiva/gajim
def zeroconf_is_connected():
    return account_is_connected(ZEROCONF_ACC_NAME) and \
     config.get_per('accounts', ZEROCONF_ACC_NAME, 'is_zeroconf')
예제 #11
0
파일: gajim.py 프로젝트: kevin-teddy/gajim
def get_jid_from_account(account_name):
    """return the jid we use in the given account"""
    name = config.get_per("accounts", account_name, "name")
    hostname = config.get_per("accounts", account_name, "hostname")
    jid = name + "@" + hostname
    return jid
예제 #12
0
파일: gajim.py 프로젝트: kevin-teddy/gajim
def zeroconf_is_connected():
    return account_is_connected(ZEROCONF_ACC_NAME) and config.get_per("accounts", ZEROCONF_ACC_NAME, "is_zeroconf")
예제 #13
0
파일: gajim.py 프로젝트: pacoqueen/bbinn
def get_jid_from_account(account_name):
	name = config.get_per('accounts', account_name, 'name')
	hostname = config.get_per('accounts', account_name, 'hostname')
	jid = name + '@' + hostname
	return jid