diff options
Diffstat (limited to 'src/multiuserchat.py')
-rw-r--r-- | src/multiuserchat.py | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/src/multiuserchat.py b/src/multiuserchat.py index 6bded78e..05b9f67a 100644 --- a/src/multiuserchat.py +++ b/src/multiuserchat.py @@ -77,18 +77,17 @@ class MultiUserChat(object): pres.addChild(name='x', namespace=NS_MUC) self.connection.send(pres) - def quit_room(self, room, nick): + def quit_room(self, room, nick, msg=None): """Quit a room""" if room is None and nick is None: self.on_disconnect() return pres = Presence(to='%s/%s' % (room, nick), typ='unavailable') + if msg: + pres.setStatus(msg) self.connection.send(pres) - self.rooms.remove(unicode(room)) - del self.rn[room] - def on_disconnect(self): """Called at disconnection""" for room in self.rooms: @@ -96,9 +95,6 @@ class MultiUserChat(object): typ='unavailable') self.connection.send(pres) - self.rooms = [] - self.rn = {} - def on_iq(self, iq): """Receive a MUC iq notification""" from_ = iq.getFrom().__str__() |