summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEmmanuel Gil Peyrot <linkmauve@linkmauve.fr>2020-06-09 16:44:19 +0200
committerEmmanuel Gil Peyrot <linkmauve@linkmauve.fr>2020-06-09 16:44:19 +0200
commitf271c87f88c98d748acd21f26916a0e553bbb735 (patch)
tree16821db6c3c10dac02ca019a4b259feb1a0b0553
parent291233bbbd81fcb1fddf6e4d1cd93478f73c1ade (diff)
downloadpoezio-f271c87f88c98d748acd21f26916a0e553bbb735.tar.gz
poezio-f271c87f88c98d748acd21f26916a0e553bbb735.tar.bz2
poezio-f271c87f88c98d748acd21f26916a0e553bbb735.tar.xz
poezio-f271c87f88c98d748acd21f26916a0e553bbb735.zip
Rename /leave into /close, and deprecate /leave
-rw-r--r--poezio/tabs/muctab.py20
1 files changed, 10 insertions, 10 deletions
diff --git a/poezio/tabs/muctab.py b/poezio/tabs/muctab.py
index b9c8dad7..1d4b9657 100644
--- a/poezio/tabs/muctab.py
+++ b/poezio/tabs/muctab.py
@@ -1521,11 +1521,7 @@ class MucTab(ChatTab):
"""
/leave [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.command_close(msg)
@command_args_parser.raw
def command_close(self, msg: str) -> None:
@@ -1533,6 +1529,9 @@ class MucTab(ChatTab):
/close [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)
def on_close(self) -> None:
@@ -2130,8 +2129,7 @@ class MucTab(ChatTab):
'name': 'leave',
'func': self.command_leave,
'usage': '[message]',
- 'desc': ('Disconnect from a room, on all of your clients. '
- 'You can specify an optional message'),
+ 'desc': 'Deprecated alias for /close',
'shortdesc': 'Leave the room.'
}, {
'name':
@@ -2140,9 +2138,11 @@ class MucTab(ChatTab):
self.command_close,
'usage':
'[message]',
- 'desc': ('Disconnect from a room and close the tab.'
- ' You can specify an optional message if '
- 'you are still connected.'),
+ 'desc': ('Disconnect from a room and close the tab. '
+ 'You can specify an optional message if '
+ 'you are still connected. If synchronise_open_tabs '
+ 'is true, also disconnect you from your other '
+ 'clients.'),
'shortdesc':
'Close the tab.'
}, {