diff bridge.py @ 18:3cdf7bb580da

Fixed bot.respond(), boosted XMPP thread to lower latency, fixed mode notice. Signed-off-by: Charly COSTE <changaco@changaco.net>
author Charly COSTE <changaco@changaco.net>
date Thu, 20 Aug 2009 01:57:51 +0200
parents 32a35f7eff70
children c1b84196c100
line wrap: on
line diff
--- a/bridge.py
+++ b/bridge.py
@@ -54,13 +54,13 @@ class bridge:
 			self.bot.error('Error: joining IRC room failed')
 			raise
 		self.bot.error('[Notice] bridge "'+str(self)+'" is running in '+self.mode+' mode')
-		self.say('[Notice] bridge "'+str(self)+'" is running in '+self.mode+' mode')
 	
 	
 	def _irc_nick_callback(self, error, arguments=[]):
 		if error == None:
 			self.irc_connection.join(self.irc_room)
 			self.bot.error('===> Debug: successfully connected on IRC side of bridge "'+str(self)+'"', debug=True)
+			self.say('[Notice] bridge "'+str(self)+'" is running in '+self.mode+' mode', on_xmpp=False)
 		if error == 'nicknameinuse':
 			self.bot.error('Error: "'+self.bot.nickname+'" is already used in the IRC chan or reserved on the IRC server of bridge "'+str(self)+'"')
 			raise Exception('Error: "'+self.bot.nickname+'" is already used in the IRC chan or reserved on the IRC server of bridge "'+str(self)+'"')
@@ -76,6 +76,7 @@ class bridge:
 		"""Called by muc._xmpp_presence_handler"""
 		if len(errors) == 0:
 			self.bot.error('===> Debug: succesfully connected on XMPP side of bridge "'+str(self)+'"', debug=True)
+			self.say('[Notice] bridge "'+str(self)+'" is running in '+self.mode+' mode', on_irc=False)
 		for error in errors:
 			try:
 				raise error
@@ -123,7 +124,7 @@ class bridge:
 		participants_nicknames = []
 		for p in self.participants:
 			if p.protocol in protocols:
-				participants_nicknames.append(p.nickname)
+				participants_nicknames.append('"'+p.nickname+'"')
 		return participants_nicknames