# HG changeset patch # User Charly COSTE # Date 1267126954 -3600 # Node ID 740effa74c18beac1fd6d10790029b24d620114d # Parent dcabe54deeba8023f91213333f7b3a53dc3bb27e bugfix for previous commit, forgot "self" argument for say_on_XMPP_through_bridge Signed-off-by: Charly COSTE diff --git a/bot.py b/bot.py --- a/bot.py +++ b/bot.py @@ -286,6 +286,11 @@ class Bot(threading.Thread): return return + + if self.debug: + self.error(1, 'presence was not handled', debug=True) + else: + self.error(say_levels.debug, 'Unhandled XMPP presence:\n'+message.__str__(fancy=1)) def _xmpp_iq_handler(self, dispatcher, iq): @@ -427,13 +432,13 @@ class Bot(threading.Thread): self.error(say_levels.error, 'Not allowed to speak on the XMPP MUC of bridge '+str(b)+', stopping it', send_to_admins=True) b.stop(message='Not allowed to speak on the XMPP MUC, stopping the bridge') else: - self.error(2, 'recevied unknown error message\n'+message.__str__(fancy=1), debug=True) + self.error(say_levels.debug, 'recevied unknown error message\n'+message.__str__(fancy=1)) return - self.error(2, 'recevied unknown error message\n'+message.__str__(fancy=1), debug=True) + self.error(say_levels.debug, 'received unknown error message\n'+message.__str__(fancy=1)) else: - self.error(2, 'Received XMPP message of unknown type "'+str(message.getType())+'".\n'+message.__str__(fancy=1), debug=True) + self.error(say_levels.debug, 'Received XMPP message of unknown type "'+str(message.getType())+'".\n'+message.__str__(fancy=1)) def _irc_event_handler(self, connection, event): diff --git a/participant.py b/participant.py --- a/participant.py +++ b/participant.py @@ -316,7 +316,7 @@ class Participant: self.say_on_XMPP_through_bridge(message) - def say_on_XMPP_through_bridge(message): + def say_on_XMPP_through_bridge(self, message): if message[:4] == '/me ': self.bridge.say(-1, '* '+self.nickname+' '+message[4:], on_irc=False) else: