init.lua

changeset 6
b0fec41e695b
parent 5
d9ed6e7d9936
child 8
9663866ca475
equal deleted inserted replaced
5:d9ed6e7d9936 6:b0fec41e695b
122 for _, plugin in ipairs(config.plugins or {"ping"}) do 122 for _, plugin in ipairs(config.plugins or {"ping"}) do
123 b:add_plugin(plugin); 123 b:add_plugin(plugin);
124 end 124 end
125 125
126 b:hook("started", function () 126 b:hook("started", function ()
127 b:send(verse.presence()); 127 local presence = verse.presence()
128 if b.caps then
129 presence:add_child(b:caps())
130 end
128 for k, v in pairs(config.autojoin or {}) do 131 for k, v in pairs(config.autojoin or {}) do
129 if type(k) == "number" then 132 if type(k) == "number" then
130 b:join_room(v); 133 b:join_room(v);
131 elseif type(k) == "string" then 134 elseif type(k) == "string" then
132 if type(v) == "string" then 135 if type(v) == "string" then

mercurial