diff options
author | louiz@4325f9fc-e183-4c21-96ce-0ab188b42d13 <louiz@4325f9fc-e183-4c21-96ce-0ab188b42d13> | 2010-12-07 16:31:30 +0000 |
---|---|---|
committer | louiz@4325f9fc-e183-4c21-96ce-0ab188b42d13 <louiz@4325f9fc-e183-4c21-96ce-0ab188b42d13> | 2010-12-07 16:31:30 +0000 |
commit | 62427ff4013796603a7a635d56927abd7643a01c (patch) | |
tree | 199a3d1793511b782b5fd93e15ba431dbb3a859a /src/common.py | |
parent | d837ce23811d8d201ced2bd8ee1554a21b836c2f (diff) | |
download | poezio-62427ff4013796603a7a635d56927abd7643a01c.tar.gz poezio-62427ff4013796603a7a635d56927abd7643a01c.tar.bz2 poezio-62427ff4013796603a7a635d56927abd7643a01c.tar.xz poezio-62427ff4013796603a7a635d56927abd7643a01c.zip |
(link mauve) fixed #2041 use JID class everywhere
Diffstat (limited to 'src/common.py')
-rw-r--r-- | src/common.py | 35 |
1 files changed, 0 insertions, 35 deletions
diff --git a/src/common.py b/src/common.py index 384fd28f..99cbd33a 100644 --- a/src/common.py +++ b/src/common.py @@ -100,41 +100,6 @@ def is_in_path(command, return_abs_path=False): pass return False -def is_jid(jid): - """ - Return True if this is a valid JID - """ - if jid.find('@') != -1: - return True - return False - -def jid_get_node(jid): - """ - nick@server/resource -> nick - """ - return jid.split('@', 1)[0] - -def jid_get_domain(jid): - """ - nick@server/resource -> server - """ - return jid.split('@',1)[-1].split('/', 1)[0] - -def jid_get_resource(fulljid): - """ - nick@server/resource -> resource - """ - if '/' in fulljid: - return fulljid.split('/', 1)[-1] - else: - return '' - -def jid_get_bare(fulljid): - """ - nick@server/resource -> nick@server - """ - return '%s@%s' % (jid_get_domain(fulljid), jid_get_node(fulljid)) - DISTRO_INFO = { 'Arch Linux': '/etc/arch-release', 'Aurox Linux': '/etc/aurox-release', |