summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormathieui <mathieui@mathieui.net>2011-06-18 12:00:28 +0200
committermathieui <mathieui@mathieui.net>2011-06-18 12:00:28 +0200
commit07ce4dcb10e8aa093ef37f9f79930d0e74104b7d (patch)
treeeba6bc07ebbf3d178551ea95980388c1918f60cc
parentda5623094d443f0bc1991414a4eafbaaf8964830 (diff)
downloadpoezio-07ce4dcb10e8aa093ef37f9f79930d0e74104b7d.tar.gz
poezio-07ce4dcb10e8aa093ef37f9f79930d0e74104b7d.tar.bz2
poezio-07ce4dcb10e8aa093ef37f9f79930d0e74104b7d.tar.xz
poezio-07ce4dcb10e8aa093ef37f9f79930d0e74104b7d.zip
Fix /connect (and renamed it to /reconnect)
-rw-r--r--src/core.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/core.py b/src/core.py
index e096b65c..0bebc25f 100644
--- a/src/core.py
+++ b/src/core.py
@@ -127,7 +127,7 @@ class Core(object):
'list': (self.command_list, _('Usage: /list\nList: get the list of public chatrooms on the specified server'), self.completion_list),
'message': (self.command_message, _('Usage: /message <jid> [optional message]\nMessage: Open a conversation with the specified JID (even if it is not in our roster), and send a message to it, if specified'), None),
'version': (self.command_version, _('Usage: /version <jid>\nVersion: get the software version of the given JID (usually its XMPP client and Operating System)'), None),
- 'connect': (self.command_reconnect, _('Usage: /connect\nConnect: disconnect from the remote server if you are currently connected and then connect to it again'), None),
+ 'reconnect': (self.command_reconnect, _('Usage: /connect\nConnect: disconnect from the remote server if you are currently connected and then connect to it again'), None),
'server_cycle': (self.command_server_cycle, _('Usage: /server_cycle [domain] [message]\nServer Cycle: disconnect and reconnects in all the rooms in domain.'), None),
}
@@ -1072,7 +1072,7 @@ class Core(object):
"""
/reconnect
"""
- self.disconnect(True)
+ self.disconnect(reconnect=True)
def command_list(self, arg):
"""
@@ -1385,7 +1385,7 @@ class Core(object):
popup_time = config.get('popup_time', 4) + (nb_lines - 1) * 2
self.pop_information_win_up(nb_lines, popup_time)
- def disconnect(self, msg=None):
+ def disconnect(self, msg=None, 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)
@@ -1397,7 +1397,7 @@ class Core(object):
# Ugly fix thanks to gmail servers
try:
sys.stderr = None
- self.xmpp.disconnect(False)
+ self.xmpp.disconnect(reconnect)
except:
pass