42 for i, room in ipairs(storage) do |
42 for i, room in ipairs(storage) do |
43 if room.name == "conference" and room.attr.jid then |
43 if room.name == "conference" and room.attr.jid then |
44 my_bookmarks[room.attr.jid] = true; -- to know which rooms are bookmarked |
44 my_bookmarks[room.attr.jid] = true; -- to know which rooms are bookmarked |
45 if room.attr.autojoin == "true" or room.attr.autojoin == "1" then |
45 if room.attr.autojoin == "true" or room.attr.autojoin == "1" then |
46 nick = room:get_child("nick"); |
46 nick = room:get_child("nick"); |
47 nick = nick and nick[1] or bot.config.nick; |
47 nick = nick and nick[1] or nil; |
48 bot:join_room(room.attr.jid, nick); |
48 bot:join_room(room.attr.jid, nick); |
49 end |
49 end |
50 -- TODO Passwords |
50 -- TODO Passwords |
51 -- Maybe get the hook in before the groupchat is loaded |
51 -- Maybe get the hook in before the groupchat is loaded |
52 -- and add to the bot.config.autojoin variable? |
52 -- and add to the bot.config.autojoin variable? |