if not jid:
self.log.debug('jid not found, is bot account moderating room?')
return nick
- jid = jid.split('/')[0] # strip ressource
+ #jid = jid.split('/')[0] # strip ressource
return jid
def log_online(self, pres):
- nick = self._get_jid(pres)
- self.log.info('got online: %s', nick)
- self.presence.append((datetime.now(), 'online', nick))
+ jid = self._get_jid(pres)
+ self.log.info('got online: %s as %s', jid, pres['muc']['nick'])
+ self.presence.append((datetime.now(), 'online', jid))
def log_offline(self, pres):
- nick = self._get_jid(pres)
- self.log.info('got offline: %s', nick)
- self.presence.append((datetime.now(), 'offline', nick))
+ jid = self._get_jid(pres)
+ self.log.info('got offline: %s was %s', jid, pres['muc']['nick'])
+ self.presence.append((datetime.now(), 'offline', jid))
def log_presence(self, pres):
nick = self._get_jid(pres)