diff options
-rw-r--r-- | src/core.py | 7 | ||||
-rw-r--r-- | src/roster.py | 4 |
2 files changed, 6 insertions, 5 deletions
diff --git a/src/core.py b/src/core.py index 0bebc25f..1351914c 100644 --- a/src/core.py +++ b/src/core.py @@ -1393,13 +1393,10 @@ class Core(object): for tab in self.tabs: if isinstance(tab, tabs.MucTab): muc.leave_groupchat(self.xmpp, tab.get_room().name, tab.get_room().own_nick, msg) + roster.empty() self.save_config() # Ugly fix thanks to gmail servers - try: - sys.stderr = None - self.xmpp.disconnect(reconnect) - except: - pass + self.xmpp.disconnect(reconnect) def command_quit(self, arg): """ diff --git a/src/roster.py b/src/roster.py index aed5f5a0..afe83c9e 100644 --- a/src/roster.py +++ b/src/roster.py @@ -45,6 +45,10 @@ class Roster(object): except IOError: return + def empty(self): + self._contacts = {} + self._roster_groups = [] + def add_contact(self, contact, jid): """ Add a contact to the contact list |