Mercurial > prosody-modules
comparison mod_register_redirect/mod_register_redirect.lua @ 1343:7dbde05b48a9
all the things: Remove trailing whitespace
| author | Florian Zeitz <florob@babelmonkeys.de> |
|---|---|
| date | Tue, 11 Mar 2014 18:44:01 +0100 |
| parents | aa93cf0b1242 |
| children | 7983335e88e9 |
comparison
equal
deleted
inserted
replaced
| 1342:0ae065453dc9 | 1343:7dbde05b48a9 |
|---|---|
| 1 -- (C) 2010-2011 Marco Cirillo (LW.Org) | 1 -- (C) 2010-2011 Marco Cirillo (LW.Org) |
| 2 -- (C) 2011 Kim Alvefur | 2 -- (C) 2011 Kim Alvefur |
| 3 -- | 3 -- |
| 4 -- Registration Redirect module for Prosody | 4 -- Registration Redirect module for Prosody |
| 5 -- | 5 -- |
| 6 -- Redirects IP addresses not in the whitelist to a web page or another method to complete the registration. | 6 -- Redirects IP addresses not in the whitelist to a web page or another method to complete the registration. |
| 7 | 7 |
| 8 local st = require "util.stanza" | 8 local st = require "util.stanza" |
| 9 local cman = configmanager | 9 local cman = configmanager |
| 10 | 10 |
| 75 :tag("url"):text(url); | 75 :tag("url"):text(url); |
| 76 else | 76 else |
| 77 reply:query("jabber:iq:register") | 77 reply:query("jabber:iq:register") |
| 78 :tag("instructions"):text(inst_text):up() | 78 :tag("instructions"):text(inst_text):up() |
| 79 end | 79 end |
| 80 | 80 |
| 81 if stanza.attr.type == "get" then | 81 if stanza.attr.type == "get" then |
| 82 return origin.send(reply) | 82 return origin.send(reply) |
| 83 else | 83 else |
| 84 return origin.send(st.error_reply(stanza, "cancel", "not-authorized")) | 84 return origin.send(st.error_reply(stanza, "cancel", "not-authorized")) |
| 85 end | 85 end |
