comparison bot.py @ 23:abdb7a2b6c6d

Minor fixes. Signed-off-by: Charly COSTE <changaco@changaco.net>
author Charly COSTE <changaco@changaco.net>
date Thu, 20 Aug 2009 18:58:29 +0200
parents e2bd4de698e5
children 4e1f27ea527b
comparison
equal deleted inserted replaced
22:e2bd4de698e5 23:abdb7a2b6c6d
190 self.error('=> Debug: Ignoring XMPP MUC message not received on bot connection.', debug=True) 190 self.error('=> Debug: Ignoring XMPP MUC message not received on bot connection.', debug=True)
191 return 191 return
192 192
193 193
194 from_ = xmpp.protocol.JID(message.getFrom()) 194 from_ = xmpp.protocol.JID(message.getFrom())
195
196 if unicode(from_.getResource()) == self.nickname:
197 self.error('=> Debug: Ignoring XMPP MUC message sent by self.', debug=True)
198 return
199
195 room_jid = unicode(from_.getNode()+'@'+from_.getDomain()) 200 room_jid = unicode(from_.getNode()+'@'+from_.getDomain())
196 for bridge in self.bridges: 201 for bridge in self.bridges:
197 if room_jid == bridge.xmpp_room.room_jid: 202 if room_jid == bridge.xmpp_room.room_jid:
198 resource = unicode(from_.getResource()) 203 resource = unicode(from_.getResource())
199 if resource == '': 204 if resource == '':
230 235
231 236
232 # Events we always want to ignore 237 # Events we always want to ignore
233 if 'all' in event.eventtype() or 'motd' in event.eventtype(): 238 if 'all' in event.eventtype() or 'motd' in event.eventtype():
234 return 239 return
235 if event.eventtype() in ['pong', 'privnotice', 'ctcp', 'nochanmodes', 'notexttosend']: 240 if event.eventtype() in ['pong', 'privnotice', 'ctcp', 'nochanmodes', 'notexttosend', 'currenttopic', 'topicinfo']:
236 self.error('=> Debug: ignoring '+event.eventtype(), debug=True) 241 self.error('=> Debug: ignoring '+event.eventtype(), debug=True)
237 return 242 return
238 243
239 244
240 nickname = None 245 nickname = None