Mercurial > xib
changeset 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 | 4011838e098e |
children | 66ed2dcdc4d1 |
files | bridge.py participant.py |
diffstat | 2 files changed, 8 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- 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:
--- 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):