clix.lua

changeset 86
12939dcba0f2
parent 82
30f85754b1e0
child 87
a93406de9f0f
equal deleted inserted replaced
85:8bc27e310e64 86:12939dcba0f2
56 local account = accounts[opts.account or "default"]; 56 local account = accounts[opts.account or "default"];
57 if not (account and account.jid) then 57 if not (account and account.jid) then
58 io.stderr:write("The specified account (", opts.account or "default", ") wasn't found in the config file\n"); 58 io.stderr:write("The specified account (", opts.account or "default", ") wasn't found in the config file\n");
59 return nil; 59 return nil;
60 end 60 end
61 verse.set_log_handler(io.stderr, not opts.verbose and {"error"}); 61 verse.set_log_handler(io.stderr, not opts.verbose and {"info", "error"});
62 local conn = verse.new(); 62 local conn = verse.new();
63 for _, plugin in ipairs(plugins or {}) do 63 for _, plugin in ipairs(plugins or {}) do
64 conn:add_plugin(plugin); 64 conn:add_plugin(plugin);
65 end 65 end
66 conn:hook("authentication-failure", function (err) 66 conn:hook("authentication-failure", function (err)

mercurial