Software /
code /
prosody
Diff
plugins/mod_dialback.lua @ 438:193f9dd64f17
Bumper commit for the new modulemanager API \o/ Updates all the modules, though some more changes may be in store.
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Thu, 27 Nov 2008 03:12:12 +0000 |
parent | 352:a73a5afd7da3 |
child | 519:cccd610a0ef9 |
line wrap: on
line diff
--- a/plugins/mod_dialback.lua Thu Nov 27 03:06:29 2008 +0000 +++ b/plugins/mod_dialback.lua Thu Nov 27 03:12:12 2008 +0000 @@ -8,7 +8,7 @@ local xmlns_dialback = "jabber:server:dialback"; -add_handler({"s2sin_unauthed", "s2sin"}, "verify", xmlns_dialback, +module:add_handler({"s2sin_unauthed", "s2sin"}, "verify", xmlns_dialback, function (origin, stanza) -- We are being asked to verify the key, to ensure it was generated by us log("debug", "verifying dialback key..."); @@ -26,7 +26,7 @@ origin.sends2s(format("<db:verify from='%s' to='%s' id='%s' type='%s'>%s</db:verify>", attr.to, attr.from, attr.id, type, stanza[1])); end); -add_handler("s2sin_unauthed", "result", xmlns_dialback, +module:add_handler("s2sin_unauthed", "result", xmlns_dialback, function (origin, stanza) -- he wants to be identified through dialback -- We need to check the key with the Authoritative server @@ -42,7 +42,7 @@ hosts[origin.to_host].s2sout[origin.from_host].dialback_verifying = origin; end); -add_handler({ "s2sout_unauthed", "s2sout" }, "verify", xmlns_dialback, +module:add_handler({ "s2sout_unauthed", "s2sout" }, "verify", xmlns_dialback, function (origin, stanza) if origin.dialback_verifying then local valid; @@ -64,7 +64,7 @@ end end); -add_handler({ "s2sout_unauthed", "s2sout" }, "result", xmlns_dialback, +module:add_handler({ "s2sout_unauthed", "s2sout" }, "result", xmlns_dialback, function (origin, stanza) if stanza.attr.type == "valid" then s2s_make_authenticated(origin);