# HG changeset patch # User Charly COSTE # Date 1267128731 -3600 # Node ID 2a1ee46f86af892d8b16d424f77c1465a63cd798 # Parent de574314990e8851d5f1dfeef06f1dd00d371f94 don't log presence from self Signed-off-by: Charly COSTE diff --git a/bot.py b/bot.py --- a/bot.py +++ b/bot.py @@ -130,12 +130,17 @@ class Bot(threading.Thread): self.error(1, 'Skipping XMPP presence not received on bot connection.', debug=True) return + from_ = xmpp.protocol.JID(presence.getFrom()) + bare_jid = unicode(from_.getNode()+'@'+from_.getDomain()) + + if bare_jid == self.bare_jid: + self.error(1, 'Ignoring XMPP presence from self', debug=True) + return + self.error(2, 'Received XMPP presence.\n'+presence.__str__(fancy=1), debug=True) no_debug_add = '\n'+presence.__str__(fancy=1) - from_ = xmpp.protocol.JID(presence.getFrom()) - bare_jid = unicode(from_.getNode()+'@'+from_.getDomain()) for bridge in self.bridges: if bare_jid == bridge.xmpp_room_jid: # presence comes from a muc