xmpp

XMPP related helper functions.

fbf.utils.xmpp.resource(userhost)

return resource of userhost.

fbf.utils.xmpp.stripped(userhost)

strip resource from userhost.

CODE

# fbf/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

urlstats

Next topic

core

This Page