Mercurial > prosody-modules
comparison mod_invite/mod_invite.lua @ 2615:efb69a260723
mod_invite: Trim trailing whitespace [luacheck]
| author | Kim Alvefur <zash@zash.se> |
|---|---|
| date | Tue, 14 Mar 2017 04:19:51 +0100 |
| parents | a6e97031972c |
| children | c814c667d4d1 |
comparison
equal
deleted
inserted
replaced
| 2614:a6e97031972c | 2615:efb69a260723 |
|---|---|
| 86 if usermanager.user_exists(prepped_username, module.host) then | 86 if usermanager.user_exists(prepped_username, module.host) then |
| 87 return apply_template(template, { classes = "alert-warning", message = "This username is already in use." }) | 87 return apply_template(template, { classes = "alert-warning", message = "This username is already in use." }) |
| 88 end | 88 end |
| 89 | 89 |
| 90 local registering = { username = prepped_username , host = module.host, allowed = true } | 90 local registering = { username = prepped_username , host = module.host, allowed = true } |
| 91 | 91 |
| 92 module:fire_event("user-registering", registering); | 92 module:fire_event("user-registering", registering); |
| 93 | 93 |
| 94 if not registering.allowed then | 94 if not registering.allowed then |
| 95 return apply_template(template, { classes = "alert-danger", message = "Registration is not allowed." }) | 95 return apply_template(template, { classes = "alert-danger", message = "Registration is not allowed." }) |
| 96 end | 96 end |
