summaryrefslogtreecommitdiff
path: root/src/tabs/muctab.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/tabs/muctab.py')
-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):