'String representation of the user session class. We use
this a lot in the server logs.'

def __str__(self):

    symbol = ''
    if (self.logged_in and hasattr(self, 'player') and self.player):
        symbol = ('(#%s)' % self.player.id)
    try:
        if hasattr(self.address, '__iter__'):
            address = ':'.join([str(part) for part in self.address])
        else:
            address = self.address
    except Exception:
        address = self.address
    return ('%s%s@%s' % (self.uname, symbol, address))
