changeset 50:dbb7c29a71e2

Ignore messages sent by self Signed-off-by: Charly COSTE <changaco@changaco.net>
author Charly COSTE <changaco@changaco.net>
date Tue, 25 Aug 2009 02:22:43 +0200
parents 714e78fb912e
children 2737ed5b9003
files bot.py
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/bot.py
+++ b/bot.py
@@ -276,6 +276,10 @@ class bot(Thread):
 			if event.eventtype() in ['quit', 'part', 'nick']:
 				self.error(event_str, debug=True)
 			
+			if event.eventtype() in ['pubmsg', 'action'] and nickname == self.nickname:
+				self.error('=> Debug: ignoring IRC '+event.eventtype()+' sent by self', debug=True)
+				return
+			
 			# TODO: lock self.bridges for thread safety
 			for bridge in self.bridges:
 				if connection.server != bridge.irc_server: