diff options
author | mathieui <mathieui@mathieui.net> | 2011-11-06 14:18:45 +0100 |
---|---|---|
committer | mathieui <mathieui@mathieui.net> | 2011-11-06 14:18:45 +0100 |
commit | fbb465a092a192821fea55eae2c7a918edf9fd59 (patch) | |
tree | 85912d93210468c971608a8761ec80c7f8493e34 /src/core.py | |
parent | 12850ed06275fa4bbe499553e8c650b9e4a3ecea (diff) | |
download | poezio-fbb465a092a192821fea55eae2c7a918edf9fd59.tar.gz poezio-fbb465a092a192821fea55eae2c7a918edf9fd59.tar.bz2 poezio-fbb465a092a192821fea55eae2c7a918edf9fd59.tar.xz poezio-fbb465a092a192821fea55eae2c7a918edf9fd59.zip |
Fixes #2284
Diffstat (limited to 'src/core.py')
-rw-r--r-- | src/core.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/core.py b/src/core.py index 70781ebf..05ae2cb1 100644 --- a/src/core.py +++ b/src/core.py @@ -1505,14 +1505,15 @@ class Core(object): self.information_win.refresh() self.current_tab().input.refresh() - def disconnect(self, msg=None, reconnect=False): + def disconnect(self, msg='', reconnect=False): """ Disconnect from remote server and correctly set the states of all parts of the client (for example, set the MucTabs as not joined, etc) """ + msg = msg or '' for tab in self.tabs: - if isinstance(tab, tabs.MucTab): - muc.leave_groupchat(self.xmpp, tab.name, tab.own_nick, msg) + if isinstance(tab, tabs.MucTab) and tab.joined: + tab.command_part(msg) roster.empty() self.save_config() # Ugly fix thanks to gmail servers |