'Extract the bare JID as a unicode string.
A bare JID does not have a resource part, so this returns either
C{user@host} or just C{host}.
@rtype: L{unicode}'

def userhost(self):

    if self.user:
        return (u'%s@%s' % (self.user, self.host))
    else:
        return self.host
