Corrects functionality of /reconnect in all type of tabs. Fixes #3471
Corrects functionality of /reconnect in all type of tabs. Fixes #3471 Moved command_reconnect from particular tabs to core.commands. Fixes #3471
This commit is contained in:
parent
86ee25491c
commit
53ededcb19
3 changed files with 17 additions and 17 deletions
|
@ -509,6 +509,16 @@ class CommandCore:
|
|||
else:
|
||||
self.core.information('No bookmark to remove', 'Info')
|
||||
|
||||
@command_args_parser.ignored
|
||||
def command_reconnect(self):
|
||||
"""
|
||||
/reconnect
|
||||
"""
|
||||
if self.core.xmpp.is_connected():
|
||||
self.core.disconnect(reconnect=True)
|
||||
else:
|
||||
self.core.xmpp.connect()
|
||||
|
||||
@command_args_parser.quoted(0, 3)
|
||||
def set(self, args):
|
||||
"""
|
||||
|
|
|
@ -1758,6 +1758,13 @@ class Core:
|
|||
"currently using in this room (instead of default_nick).",
|
||||
shortdesc="Bookmark a room online.",
|
||||
completion=self.completion.bookmark)
|
||||
self.register_command(
|
||||
'reconnect',
|
||||
self.command.command_reconnect,
|
||||
usage="[reconnect]",
|
||||
desc='Disconnect from the remote server if you are '
|
||||
'currently connected and then connect to it again.',
|
||||
shortdesc='Disconnect and reconnect to the server.')
|
||||
self.register_command(
|
||||
'set',
|
||||
self.command.set,
|
||||
|
|
|
@ -165,13 +165,6 @@ class RosterInfoTab(Tab):
|
|||
self.command_password,
|
||||
usage='<password>',
|
||||
shortdesc='Change your password')
|
||||
|
||||
self.register_command(
|
||||
'reconnect',
|
||||
self.command_reconnect,
|
||||
desc='Disconnect from the remote server if you are '
|
||||
'currently connected and then connect to it again.',
|
||||
shortdesc='Disconnect and reconnect to the server.')
|
||||
self.register_command(
|
||||
'disconnect',
|
||||
self.command_disconnect,
|
||||
|
@ -532,16 +525,6 @@ class RosterInfoTab(Tab):
|
|||
|
||||
self.core.xmpp.plugin['xep_0191'].get_blocked(callback=callback)
|
||||
|
||||
@command_args_parser.ignored
|
||||
def command_reconnect(self):
|
||||
"""
|
||||
/reconnect
|
||||
"""
|
||||
if self.core.xmpp.is_connected():
|
||||
self.core.disconnect(reconnect=True)
|
||||
else:
|
||||
self.core.xmpp.connect()
|
||||
|
||||
@command_args_parser.ignored
|
||||
def command_disconnect(self):
|
||||
"""
|
||||
|
|
Loading…
Reference in a new issue