summaryrefslogtreecommitdiff
path: root/src/tabs
diff options
context:
space:
mode:
authormathieui <mathieui@mathieui.net>2015-10-05 21:39:24 +0200
committermathieui <mathieui@mathieui.net>2015-10-05 21:39:24 +0200
commit62491a4caad2565ab81b62eedf053569976cbfe1 (patch)
tree58bf52a1449cd864d066abc6e14c7d083f41e6a4 /src/tabs
parentad107389815c2d943003350a66962e8491fb4c8d (diff)
downloadpoezio-62491a4caad2565ab81b62eedf053569976cbfe1.tar.gz
poezio-62491a4caad2565ab81b62eedf053569976cbfe1.tar.bz2
poezio-62491a4caad2565ab81b62eedf053569976cbfe1.tar.xz
poezio-62491a4caad2565ab81b62eedf053569976cbfe1.zip
Fix #3130 (self-ping & /cycle not using known room password)
Diffstat (limited to 'src/tabs')
-rw-r--r--src/tabs/muctab.py18
1 files changed, 17 insertions, 1 deletions
diff --git a/src/tabs/muctab.py b/src/tabs/muctab.py
index 02979f09..979d3ae4 100644
--- a/src/tabs/muctab.py
+++ b/src/tabs/muctab.py
@@ -421,7 +421,23 @@ class MucTab(ChatTab):
self.disconnect()
self.user_win.pos = 0
self.core.disable_private_tabs(self.name)
- self.core.command_join('"%s/%s"' % (self.name, self.own_nick))
+ self.join()
+
+ def join(self):
+ """
+ Join the room
+ """
+ status = self.core.get_status()
+ if self.last_connection:
+ delta = datetime.now() - self.last_connection
+ seconds = delta.seconds + delta.days * 24 * 3600
+ else:
+ seconds = 0
+ muc.join_groupchat(self.core, self.name, self.own_nick,
+ self.password,
+ status=status.message,
+ show=status.show,
+ seconds=seconds)
@command_args_parser.quoted(0, 1, [''])
def command_recolor(self, args):