jsb.utils.xmpp

XMPP related helper functions.

jsb.utils.xmpp.resource(userhost)

return resource of userhost.

jsb.utils.xmpp.stripped(userhost)

strip resource from userhost.

CODE

# jsb/utils/xmpp.py
#
#

""" XMPP related helper functions. """

def stripped(userhost):
    """ strip resource from userhost. """
    return userhost.split('/')[0]

def resource(userhost):
    """ return resource of userhost. """
    try: return userhost.split('/')[1]
    except (IndexError, ValueError): return ""

Table Of Contents

Previous topic

jsb.utils.urlstats

Next topic

jsb.plugs.core

This Page