Comparison

plugins/sasl.lua @ 490:6b2f31da9610

Update for new Prosody module namespace
author Kim Alvefur <zash@zash.se>
date Sat, 20 May 2023 20:48:03 +0200
parent 467:8e6a7a5e70b3
comparison
equal deleted inserted replaced
489:39ed19f12dca 490:6b2f31da9610
17 mech = mech:get_text(); 17 mech = mech:get_text();
18 stream:debug("Server offers %s", mech); 18 stream:debug("Server offers %s", mech);
19 offered[mech] = true; 19 offered[mech] = true;
20 if not mechanisms[mech] then 20 if not mechanisms[mech] then
21 local name = mech:match("[^-]+"); 21 local name = mech:match("[^-]+");
22 local ok, impl = pcall(require, "util.sasl."..name:lower()); 22 local ok, impl = pcall(require, "verse.util.sasl."..name:lower());
23 if ok then 23 if ok then
24 stream:debug("Loaded SASL %s module", name); 24 stream:debug("Loaded SASL %s module", name);
25 mechanisms[mech], preference[mech] = impl(stream, mech); 25 mechanisms[mech], preference[mech] = impl(stream, mech);
26 elseif not tostring(impl):match("not found") then 26 elseif not tostring(impl):match("not found") then
27 stream:debug("Loading failed: %s", tostring(impl)); 27 stream:debug("Loading failed: %s", tostring(impl));