changeset 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
files bot.py irclib.py
diffstat 2 files changed, 6 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/bot.py
+++ b/bot.py
@@ -192,6 +192,11 @@ class bot(Thread):
 			
 			
 			from_ = xmpp.protocol.JID(message.getFrom())
+			
+			if unicode(from_.getResource()) == self.nickname:
+				self.error('=> Debug: Ignoring XMPP MUC message sent by self.', debug=True)
+				return
+			
 			room_jid = unicode(from_.getNode()+'@'+from_.getDomain())
 			for bridge in self.bridges:
 				if room_jid == bridge.xmpp_room.room_jid:
@@ -232,7 +237,7 @@ class bot(Thread):
 		# Events we always want to ignore
 		if 'all' in event.eventtype() or 'motd' in event.eventtype():
 			return
-		if event.eventtype() in ['pong', 'privnotice', 'ctcp', 'nochanmodes', 'notexttosend']:
+		if event.eventtype() in ['pong', 'privnotice', 'ctcp', 'nochanmodes', 'notexttosend', 'currenttopic', 'topicinfo']:
 			self.error('=> Debug: ignoring '+event.eventtype(), debug=True)
 			return
 		
--- a/irclib.py
+++ b/irclib.py
@@ -698,7 +698,6 @@ class ServerConnection(Connection):
         except socket.error, x:
             pass
         self.socket = None
-        self.irclibobj
         self._handle_event(Event("disconnect", self.server, "", [message]))
 
     def globops(self, text):