comparison bridge.py @ 197:4a379eb359dd

bugfix, forgot "importance" argument of Bridge.say() in c5922031a4ac09c95713c4a4a18b1e0a0aad3e54 Signed-off-by: Charly COSTE <changaco@changaco.net>
author Charly COSTE <changaco@changaco.net>
date Tue, 23 Feb 2010 22:14:13 +0100
parents e4ceefab8ba5
children de574314990e
comparison
equal deleted inserted replaced
196:4011838e098e 197:4a379eb359dd
350 350
351 def say(self, importance, message, on_irc=True, on_xmpp=True, log=False, send_to_admins=False): 351 def say(self, importance, message, on_irc=True, on_xmpp=True, log=False, send_to_admins=False):
352 """Make the bot say something.""" 352 """Make the bot say something."""
353 if log or send_to_admins: 353 if log or send_to_admins:
354 self.bot.error(importance, message+' ('+str(self)+')', send_to_admins=send_to_admins) 354 self.bot.error(importance, message+' ('+str(self)+')', send_to_admins=send_to_admins)
355 message = self.bot.format_message(importance, message) 355 if importance != -1:
356 if importance < self.say_level: 356 message = self.bot.format_message(importance, message)
357 return 357 if importance < self.say_level:
358 return
358 if on_xmpp and isinstance(self.xmpp_room, xmpp.muc) and self.xmpp_room.connected: 359 if on_xmpp and isinstance(self.xmpp_room, xmpp.muc) and self.xmpp_room.connected:
359 self.xmpp_room.say(message) 360 self.xmpp_room.say(message)
360 if on_irc and isinstance(self.irc_connection, ServerConnection) and self.irc_connection.really_connected: 361 if on_irc and isinstance(self.irc_connection, ServerConnection) and self.irc_connection.really_connected:
361 self.irc_connection.privmsg(self.irc_room, message) 362 self.irc_connection.privmsg(self.irc_room, message)
362 363