summaryrefslogtreecommitdiff
path: root/src/tabs.py
diff options
context:
space:
mode:
authormathieui <mathieui@mathieui.net>2012-07-30 19:05:20 +0200
committermathieui <mathieui@mathieui.net>2012-07-30 19:05:20 +0200
commit88d32a7bc4f8f97a488c313952103567038b1c32 (patch)
tree03de26386ead20ceeb60f842f0ebc03b5ea54d87 /src/tabs.py
parentec7dd75012bafd5281e88aa83c54547cb3b36bf5 (diff)
downloadpoezio-88d32a7bc4f8f97a488c313952103567038b1c32.tar.gz
poezio-88d32a7bc4f8f97a488c313952103567038b1c32.tar.bz2
poezio-88d32a7bc4f8f97a488c313952103567038b1c32.tar.xz
poezio-88d32a7bc4f8f97a488c313952103567038b1c32.zip
Add an autorejoin_delay option
- document it - works in per-tab config too
Diffstat (limited to 'src/tabs.py')
-rw-r--r--src/tabs.py12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/tabs.py b/src/tabs.py
index 74475779..d6369a9d 100644
--- a/src/tabs.py
+++ b/src/tabs.py
@@ -1350,7 +1350,17 @@ class MucTab(ChatTab):
self.core.doupdate()
# try to auto-rejoin
if config.get_by_tabname('autorejoin', 'false', self.general_jid, True) == 'true':
- muc.join_groupchat(self.core.xmpp, self.name, self.own_nick)
+ delay = config.get_by_tabname('autorejoin_delay', "5", self.general_jid, True)
+ delay = common.parse_str_to_secs(delay)
+ if delay <= 0:
+ muc.join_groupchat(self.core.xmpp, self.name, self.own_nick)
+ else:
+ self.core.add_timed_event(timed_events.DelayedEvent(
+ delay,
+ muc.join_groupchat,
+ self.core.xmpp,
+ self.name,
+ self.own_nick))
else:
color = user.color[0] if config.get_by_tabname('display_user_color_in_join_part', '', self.general_jid, True) == 'true' else 3
if by: