Forced merge.
[prosody.git] / plugins / mod_legacyauth.lua
index 59549cf74ea6ce6e1027b95bfa2e2a474fb54878..81e2ff7ffc9649c8f89f560bfdf9ba6339145e0f 100644 (file)
@@ -2,7 +2,9 @@
 local st = require "util.stanza";
 local t_concat = table.concat;
 
-add_iq_handler("c2s_unauthed", "jabber:iq:auth", 
+require "core.discomanager".set("legacyauth", "jabber:iq:auth");
+
+module:add_iq_handler("c2s_unauthed", "jabber:iq:auth", 
                function (session, stanza)
                        local username = stanza.tags[1]:child_with_name("username");
                        local password = stanza.tags[1]:child_with_name("password");
@@ -41,4 +43,4 @@ add_iq_handler("c2s_unauthed", "jabber:iq:auth",
                                end
                        end
                        
-               end);
\ No newline at end of file
+               end);