# HG changeset patch # User Marco Cirillo # Date 1346024076 0 # Node ID 7d1d3ca31d03bee3d1f726d4092e26fe359123e0 # Parent d15a9eaa63ea5d7de65c37152d9a0da4a2e47ed9 mod_register_redirect: rebacked in changeset c6f1427da79d (behaviour fixed). diff -r d15a9eaa63ea -r 7d1d3ca31d03 mod_register_redirect/mod_register_redirect.lua --- a/mod_register_redirect/mod_register_redirect.lua Mon Aug 27 00:06:06 2012 +0200 +++ b/mod_register_redirect/mod_register_redirect.lua Sun Aug 26 23:34:36 2012 +0000 @@ -36,11 +36,11 @@ module:log("error", "This module supports only http/https, mailto or xmpp as URL formats.") module:log("error", "If you want to use personalized instructions without an Out-Of-Band method,") module:log("error", "specify: register_oob = false; -- in your configuration along your banner string (register_text).") - origin.send(st.error_reply(stanza, "wait", "internal-server-error")) ; return true -- bouncing request. + return origin.send(st.error_reply(stanza, "wait", "internal-server-error")) -- bouncing request. end else module:log("error", "Please check your configuration, the URL you specified is invalid") - origin.send(st.error_reply(stanza, "wait", "internal-server-error")) ; return true -- bouncing request. + return origin.send(st.error_reply(stanza, "wait", "internal-server-error")) -- bouncing request. end else if admins_l then @@ -53,14 +53,14 @@ else module:log("error", "Please be sure to, _at the very least_, configure one server administrator either global or hostwise...") module:log("error", "if you want to use this module, or read it's configuration wiki at: http://code.google.com/p/prosody-modules/wiki/mod_register_redirect") - origin.send(st.error_reply(stanza, "wait", "internal-server-error")) ; return true -- bouncing request. + return origin.send(st.error_reply(stanza, "wait", "internal-server-error")) -- bouncing request. end end end elseif inst_text and url and oob then if not url:match("^%w+[:].*$") then module:log("error", "Please check your configuration, the URL specified is not valid.") - origin.send(st.error_reply(stanza, "wait", "internal-server-error")) ; return true -- bouncing request. + return origin.send(st.error_reply(stanza, "wait", "internal-server-error")) -- bouncing request. end end @@ -84,11 +84,10 @@ end if stanza.attr.type == "get" then - origin.send(reply) + return origin.send(reply) else - origin.send(st.error_reply(stanza, "cancel", "not-authorized")) + return origin.send(st.error_reply(stanza, "cancel", "not-authorized")) end - return true end module:hook("stanza/iq/jabber:iq:register:query", reg_redirect, 10)