Rename /leave into /close, and deprecate /leave
This commit is contained in:
parent
291233bbbd
commit
f271c87f88
1 changed files with 10 additions and 10 deletions
|
@ -1521,11 +1521,7 @@ class MucTab(ChatTab):
|
||||||
"""
|
"""
|
||||||
/leave [msg]
|
/leave [msg]
|
||||||
"""
|
"""
|
||||||
self.leave_room(msg)
|
self.command_close(msg)
|
||||||
if config.get('synchronise_open_rooms'):
|
|
||||||
self.core.bookmarks[self.jid].autojoin = False
|
|
||||||
self.core.bookmarks.save(self.core.xmpp)
|
|
||||||
self.core.close_tab(self)
|
|
||||||
|
|
||||||
@command_args_parser.raw
|
@command_args_parser.raw
|
||||||
def command_close(self, msg: str) -> None:
|
def command_close(self, msg: str) -> None:
|
||||||
|
@ -1533,6 +1529,9 @@ class MucTab(ChatTab):
|
||||||
/close [msg]
|
/close [msg]
|
||||||
"""
|
"""
|
||||||
self.leave_room(msg)
|
self.leave_room(msg)
|
||||||
|
if config.get('synchronise_open_rooms'):
|
||||||
|
self.core.bookmarks[self.jid].autojoin = False
|
||||||
|
self.core.bookmarks.save(self.core.xmpp)
|
||||||
self.core.close_tab(self)
|
self.core.close_tab(self)
|
||||||
|
|
||||||
def on_close(self) -> None:
|
def on_close(self) -> None:
|
||||||
|
@ -2130,8 +2129,7 @@ class MucTab(ChatTab):
|
||||||
'name': 'leave',
|
'name': 'leave',
|
||||||
'func': self.command_leave,
|
'func': self.command_leave,
|
||||||
'usage': '[message]',
|
'usage': '[message]',
|
||||||
'desc': ('Disconnect from a room, on all of your clients. '
|
'desc': 'Deprecated alias for /close',
|
||||||
'You can specify an optional message'),
|
|
||||||
'shortdesc': 'Leave the room.'
|
'shortdesc': 'Leave the room.'
|
||||||
}, {
|
}, {
|
||||||
'name':
|
'name':
|
||||||
|
@ -2140,9 +2138,11 @@ class MucTab(ChatTab):
|
||||||
self.command_close,
|
self.command_close,
|
||||||
'usage':
|
'usage':
|
||||||
'[message]',
|
'[message]',
|
||||||
'desc': ('Disconnect from a room and close the tab.'
|
'desc': ('Disconnect from a room and close the tab. '
|
||||||
' You can specify an optional message if '
|
'You can specify an optional message if '
|
||||||
'you are still connected.'),
|
'you are still connected. If synchronise_open_tabs '
|
||||||
|
'is true, also disconnect you from your other '
|
||||||
|
'clients.'),
|
||||||
'shortdesc':
|
'shortdesc':
|
||||||
'Close the tab.'
|
'Close the tab.'
|
||||||
}, {
|
}, {
|
||||||
|
|
Loading…
Reference in a new issue