changeset 255:38dd27098fef

minor fix in _irc_event_handler, check source_nickname before giving it to Bridge.get_participant Signed-off-by: Charly COSTE <changaco@changaco.net>
author Charly COSTE <changaco@changaco.net>
date Wed, 10 Mar 2010 13:13:13 +0100
parents 3b930e2fad43
children f14b32e7fdb5
files bot.py
diffstat 1 files changed, 6 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/bot.py
+++ b/bot.py
@@ -601,10 +601,12 @@ class Bot(threading.Thread):
 			
 			bridge = self.get_bridge(irc_room=chan, irc_server=connection.server)
 			
-			try:
-				from_ = bridge.get_participant(source_nickname)
-			except Bridge.NoSuchParticipantException:
-				from_ = None
+			from_ = None
+			if source_nickname:
+				try:
+					from_ = bridge.get_participant(source_nickname)
+				except Bridge.NoSuchParticipantException:
+					pass
 			
 			
 			# Join event