summaryrefslogtreecommitdiff
path: root/src/core/commands.py
diff options
context:
space:
mode:
authorFlorent Le Coz <louiz@louiz.org>2014-07-30 17:24:41 +0200
committerFlorent Le Coz <louiz@louiz.org>2014-07-30 17:35:21 +0200
commitecf22cb4a4261b1fbbe893a0ec1bf185fcc02db8 (patch)
tree0f50ed72760d4c030edd701597e6ab1a7f78a9cb /src/core/commands.py
parenta404195a0a57030017067573aba1de2570f0280c (diff)
downloadpoezio-ecf22cb4a4261b1fbbe893a0ec1bf185fcc02db8.tar.gz
poezio-ecf22cb4a4261b1fbbe893a0ec1bf185fcc02db8.tar.bz2
poezio-ecf22cb4a4261b1fbbe893a0ec1bf185fcc02db8.tar.xz
poezio-ecf22cb4a4261b1fbbe893a0ec1bf185fcc02db8.zip
Fix all the connect() reconnect() stuff
The /reconnect command should now properly work everytime.
Diffstat (limited to 'src/core/commands.py')
-rw-r--r--src/core/commands.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/core/commands.py b/src/core/commands.py
index 1713c0f1..c7d900c3 100644
--- a/src/core/commands.py
+++ b/src/core/commands.py
@@ -807,6 +807,9 @@ def command_quit(self, arg=''):
"""
/quit
"""
+ if not self.xmpp.is_connected():
+ self.exit()
+ return
if len(arg.strip()) != 0:
msg = arg
else:
@@ -820,8 +823,7 @@ def command_quit(self, arg=''):
self.save_config()
self.plugin_manager.disable_plugins()
self.disconnect(msg)
- self.running = False
- self.reset_curses()
+ self.xmpp.add_event_handler("disconnected", self.exit, disposable=True)
def command_destroy_room(self, arg=''):
"""