Mercurial > xib
diff participant.py @ 259:3b318108e9e0
(muc) created "state" attribute to replace the "connected" one
Signed-off-by: Charly COSTE <changaco@changaco.net>
author | Charly COSTE <changaco@changaco.net> |
---|---|
date | Thu, 11 Mar 2010 14:15:31 +0100 |
parents | 3b930e2fad43 |
children | 9a2302e8382b |
line wrap: on
line diff
--- a/participant.py +++ b/participant.py @@ -321,14 +321,14 @@ class Participant: def say_on_xmpp(self, message, action=False): - if isinstance(self.muc, xmpp.muc) and self.muc.connected: + if isinstance(self.muc, xmpp.muc) and self.muc.state == self.muc.JOINED: self.muc.say(message, action=action) elif not isinstance(self.irc_connection, ServerConnection): self.bridge.say_on_behalf(self.nickname, message, 'xmpp', action=action) def say_on_xmpp_to(self, to, message, action=False): - if isinstance(self.muc, xmpp.muc) and self.muc.connected: + if isinstance(self.muc, xmpp.muc) and self.muc.state == self.muc.JOINED: self.muc.say_to(to, message, action=action) elif not isinstance(self.irc_connection, ServerConnection): if self.bridge.mode not in ['normal', 'bypass']: @@ -367,7 +367,7 @@ class Participant: if isinstance(self.irc_connection, ServerConnection): r += '\nself.irc_connection='+str(self.irc_connection)+'\n'+'self.irc_connection.logged_in='+str(self.irc_connection.logged_in) if isinstance(self.muc, xmpp.muc): - r += '\nself.muc.connected='+str(self.muc.connected) + r += '\nself.muc.state='+str(self.muc.state) return r