From ea488e1a21528115c81f2bab46e794be782d68ea Mon Sep 17 00:00:00 2001 From: kaliko Date: Sat, 26 Oct 2024 18:32:24 +0200 Subject: [PATCH] log: Add jid and nick --- sid/log.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) 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) -- 2.39.5