plugins/sasl.lua

changeset 360
ac3940bad1bf
parent 358
a8f6fd6a70ed
child 380
0891b4e27766
equal deleted inserted replaced
359:a7aa761a436d 360:ac3940bad1bf
18 if not mechanisms[mech] then 18 if not mechanisms[mech] then
19 local name = mech:match("[^-]+"); 19 local name = mech:match("[^-]+");
20 local ok, impl = pcall(require, "util.sasl."..name:lower()); 20 local ok, impl = pcall(require, "util.sasl."..name:lower());
21 if ok then 21 if ok then
22 stream:debug("Loaded SASL %s module", name); 22 stream:debug("Loaded SASL %s module", name);
23 mechanisms[name], preference[name] = impl(stream, name); 23 mechanisms[mech], preference[mech] = impl(stream, mech);
24 elseif not tostring(impl):match("not found") then 24 elseif not tostring(impl):match("not found") then
25 stream:debug("Loading failed: %s", tostring(impl)); 25 stream:debug("Loading failed: %s", tostring(impl));
26 end 26 end
27 end 27 end
28 end 28 end

mercurial