From: kaliko Date: Sat, 26 Oct 2024 16:32:24 +0000 (+0200) Subject: log: Add jid and nick X-Git-Url: https://git.kaliko.me/?a=commitdiff_plain;h=HEAD;p=sid.git log: Add jid and nick --- diff --git a/sid/log.py b/sid/log.py index 1872c1b..7962415 100644 --- a/sid/log.py +++ b/sid/log.py @@ -34,18 +34,18 @@ class Log(Plugin): 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)