comparison bridge.py @ 182:60ee2b914616

minor fix in bridge.py, importance was printed twice Signed-off-by: Charly COSTE <changaco@changaco.net>
author Charly COSTE <changaco@changaco.net>
date Fri, 19 Feb 2010 14:14:51 +0100
parents 102f895347ff
children 594f570f4657
comparison
equal deleted inserted replaced
181:803e00d72cb7 182:60ee2b914616
351 self.init2() 351 self.init2()
352 352
353 353
354 def say(self, importance, message, on_irc=True, on_xmpp=True, log=False, send_to_admins=False): 354 def say(self, importance, message, on_irc=True, on_xmpp=True, log=False, send_to_admins=False):
355 """Make the bot say something.""" 355 """Make the bot say something."""
356 message = self.bot.format_message(importance, message)
357 if log or send_to_admins: 356 if log or send_to_admins:
358 self.bot.error(importance, message+' ('+str(self)+')', send_to_admins=send_to_admins) 357 self.bot.error(importance, message+' ('+str(self)+')', send_to_admins=send_to_admins)
358 message = self.bot.format_message(importance, message)
359 if importance < self.say_level: 359 if importance < self.say_level:
360 return 360 return
361 if on_xmpp == True: 361 if on_xmpp == True:
362 self.xmpp_room.say(message) 362 self.xmpp_room.say(message)
363 if on_irc == True: 363 if on_irc == True: