summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormathieui <mathieui@mathieui.net>2013-01-18 22:38:26 +0100
committermathieui <mathieui@mathieui.net>2013-01-18 23:25:33 +0100
commitb3341c63272be3322a7276a3f1ff34598888ce0a (patch)
treef58f41e70f4189c1197684e0593bece99d31bcdb /src
parent90599a35e90c761261226681cbb3a9e1a187bf8a (diff)
downloadpoezio-b3341c63272be3322a7276a3f1ff34598888ce0a.tar.gz
poezio-b3341c63272be3322a7276a3f1ff34598888ce0a.tar.bz2
poezio-b3341c63272be3322a7276a3f1ff34598888ce0a.tar.xz
poezio-b3341c63272be3322a7276a3f1ff34598888ce0a.zip
Open tabs for rooms without autojoin (but do not join them)
Diffstat (limited to 'src')
-rw-r--r--src/core.py17
1 files changed, 10 insertions, 7 deletions
diff --git a/src/core.py b/src/core.py
index b30e7ad6..f3455e75 100644
--- a/src/core.py
+++ b/src/core.py
@@ -2918,22 +2918,25 @@ class Core(object):
bookmark.get_local()
if not self.xmpp.anon and not config.get('use_remote_bookmarks', 'true').lower() == 'false':
bookmark.get_remote(self.xmpp)
- for bm in [item for item in bookmark.bookmarks if item.autojoin]:
+ for bm in bookmark.bookmarks:
tab = self.get_tab_by_name(bm.jid, tabs.MucTab)
if not tab:
self.open_new_room(bm.jid, bm.nick, False)
nick = bm.nick if bm.nick else self.own_nick
self.initial_joins.append(bm.jid)
- histo_length= config.get('muc_history_length', 20)
+ histo_length = config.get('muc_history_length', 20)
if histo_length == -1:
histo_length= None
if histo_length is not None:
histo_length= str(histo_length)
- muc.join_groupchat(self.xmpp, bm.jid, nick,
- passwd=bm.password,
- maxhistory=histo_length,
- status=self.status.message,
- show=self.status.show)
+ # do not join rooms that do not have autojoin
+ # but display them anyway
+ if bm.autojoin:
+ muc.join_groupchat(self.xmpp, bm.jid, nick,
+ passwd=bm.password,
+ maxhistory=histo_length,
+ status=self.status.message,
+ show=self.status.show)
### Other handlers ###