# HG changeset patch # User Charly COSTE # Date 1266959653 -3600 # Node ID 4a379eb359dd905aa91a18a45f5c910341d0e890 # Parent 4011838e098ec2da8a4cb288b2c7e17fade620bd bugfix, forgot "importance" argument of Bridge.say() in c5922031a4ac09c95713c4a4a18b1e0a0aad3e54 Signed-off-by: Charly COSTE diff --git a/bridge.py b/bridge.py --- a/bridge.py +++ b/bridge.py @@ -352,9 +352,10 @@ class Bridge: """Make the bot say something.""" if log or send_to_admins: self.bot.error(importance, message+' ('+str(self)+')', send_to_admins=send_to_admins) - message = self.bot.format_message(importance, message) - if importance < self.say_level: - return + if importance != -1: + message = self.bot.format_message(importance, message) + if importance < self.say_level: + return if on_xmpp and isinstance(self.xmpp_room, xmpp.muc) and self.xmpp_room.connected: self.xmpp_room.say(message) if on_irc and isinstance(self.irc_connection, ServerConnection) and self.irc_connection.really_connected: diff --git a/participant.py b/participant.py --- a/participant.py +++ b/participant.py @@ -294,9 +294,9 @@ class Participant: bot_say = True if bot_say: if action: - self.bridge.say('* '+self.nickname+' '+message, on_xmpp=False) + self.bridge.say(-1, '* '+self.nickname+' '+message, on_xmpp=False) else: - self.bridge.say('<'+self.nickname+'> '+message, on_xmpp=False) + self.bridge.say(-1, '<'+self.nickname+'> '+message, on_xmpp=False) def sayOnIRCTo(self, to, message): @@ -314,9 +314,9 @@ class Participant: self.muc.say(message) elif not isinstance(self.irc_connection, ServerConnection): if message[:4] == '/me ': - self.bridge.say('* '+self.nickname+' '+message[4:], on_irc=False) + self.bridge.say(-1, '* '+self.nickname+' '+message[4:], on_irc=False) else: - self.bridge.say('<'+self.nickname+'> '+message, on_irc=False) + self.bridge.say(-1, '<'+self.nickname+'> '+message, on_irc=False) def sayOnXMPPTo(self, to, message):