Mercurial > xib
comparison bot.py @ 202:2a1ee46f86af
don't log presence from self
Signed-off-by: Charly COSTE <changaco@changaco.net>
author | Charly COSTE <changaco@changaco.net> |
---|---|
date | Thu, 25 Feb 2010 21:12:11 +0100 |
parents | de574314990e |
children | 2a81c480439a |
comparison
equal
deleted
inserted
replaced
201:de574314990e | 202:2a1ee46f86af |
---|---|
128 | 128 |
129 if xmpp_c.nickname != self.nickname: | 129 if xmpp_c.nickname != self.nickname: |
130 self.error(1, 'Skipping XMPP presence not received on bot connection.', debug=True) | 130 self.error(1, 'Skipping XMPP presence not received on bot connection.', debug=True) |
131 return | 131 return |
132 | 132 |
133 self.error(2, 'Received XMPP presence.\n'+presence.__str__(fancy=1), debug=True) | |
134 | |
135 no_debug_add = '\n'+presence.__str__(fancy=1) | |
136 | |
137 from_ = xmpp.protocol.JID(presence.getFrom()) | 133 from_ = xmpp.protocol.JID(presence.getFrom()) |
138 bare_jid = unicode(from_.getNode()+'@'+from_.getDomain()) | 134 bare_jid = unicode(from_.getNode()+'@'+from_.getDomain()) |
135 | |
136 if bare_jid == self.bare_jid: | |
137 self.error(1, 'Ignoring XMPP presence from self', debug=True) | |
138 return | |
139 | |
140 self.error(2, 'Received XMPP presence.\n'+presence.__str__(fancy=1), debug=True) | |
141 | |
142 no_debug_add = '\n'+presence.__str__(fancy=1) | |
143 | |
139 for bridge in self.bridges: | 144 for bridge in self.bridges: |
140 if bare_jid == bridge.xmpp_room_jid: | 145 if bare_jid == bridge.xmpp_room_jid: |
141 # presence comes from a muc | 146 # presence comes from a muc |
142 resource = unicode(from_.getResource()) | 147 resource = unicode(from_.getResource()) |
143 | 148 |