summaryrefslogtreecommitdiff
path: root/src/tabs
diff options
context:
space:
mode:
authormathieui <mathieui@mathieui.net>2014-04-17 00:02:19 +0200
committermathieui <mathieui@mathieui.net>2014-04-17 00:02:19 +0200
commit71ae73ca7b37123d741eb065dc26d85d12922c43 (patch)
tree7af26c9f10485d3a65faf0f02ffc6e8fe68df587 /src/tabs
parent214904f19900996b47d9c42bb7240853ef88fe89 (diff)
downloadpoezio-71ae73ca7b37123d741eb065dc26d85d12922c43.tar.gz
poezio-71ae73ca7b37123d741eb065dc26d85d12922c43.tar.bz2
poezio-71ae73ca7b37123d741eb065dc26d85d12922c43.tar.xz
poezio-71ae73ca7b37123d741eb065dc26d85d12922c43.zip
Log part messages and show a leave message on /cycle
Diffstat (limited to 'src/tabs')
-rw-r--r--src/tabs/muctab.py9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/tabs/muctab.py b/src/tabs/muctab.py
index 7c4ba1d0..c2f7925a 100644
--- a/src/tabs/muctab.py
+++ b/src/tabs/muctab.py
@@ -340,12 +340,11 @@ class MucTab(ChatTab):
def command_cycle(self, arg):
"""/cycle [reason]"""
- if self.joined:
- muc.leave_groupchat(self.core.xmpp, self.get_name(), self.own_nick, arg)
+ self.command_part(arg)
self.disconnect()
+ self.user_win.pos = 0
self.core.disable_private_tabs(self.name)
self.core.command_join('"/%s"' % self.own_nick)
- self.user_win.pos = 0
def command_recolor(self, arg):
"""
@@ -414,8 +413,6 @@ class MucTab(ChatTab):
arg = arg.strip()
msg = None
if self.joined:
- self.disconnect()
- muc.leave_groupchat(self.core.xmpp, self.name, self.own_nick, arg)
info_col = dump_tuple(get_theme().COLOR_INFORMATION_TEXT)
char_quit = get_theme().CHAR_QUIT
spec_col = dump_tuple(get_theme().COLOR_QUIT_CHAR)
@@ -447,6 +444,8 @@ class MucTab(ChatTab):
}
self.add_message(msg, typ=2)
+ self.disconnect()
+ muc.leave_groupchat(self.core.xmpp, self.name, self.own_nick, arg)
self.core.disable_private_tabs(self.name, reason=msg)
if self == self.core.current_tab():
self.refresh()