Software /
code /
prosody
Comparison
plugins/mod_watchregistrations.lua @ 13202:173038306750
plugins: Use get_option_enum where appropriate
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sat, 16 Jan 2021 21:04:58 +0100 |
parent | 12977:74b9e05af71e |
comparison
equal
deleted
inserted
replaced
13201:65fb0d7a2312 | 13202:173038306750 |
---|---|
11 local jid_prep = require "prosody.util.jid".prep; | 11 local jid_prep = require "prosody.util.jid".prep; |
12 | 12 |
13 local registration_watchers = module:get_option_set("registration_watchers", module:get_option("admins", {})) / jid_prep; | 13 local registration_watchers = module:get_option_set("registration_watchers", module:get_option("admins", {})) / jid_prep; |
14 local registration_from = module:get_option_string("registration_from", host); | 14 local registration_from = module:get_option_string("registration_from", host); |
15 local registration_notification = module:get_option_string("registration_notification", "User $username just registered on $host from $ip"); | 15 local registration_notification = module:get_option_string("registration_notification", "User $username just registered on $host from $ip"); |
16 local msg_type = module:get_option_string("registration_notification_type", "chat"); | 16 local msg_type = module:get_option_enum("registration_notification_type", "chat", "normal", "headline"); |
17 | 17 |
18 local st = require "prosody.util.stanza"; | 18 local st = require "prosody.util.stanza"; |
19 | 19 |
20 module:hook("user-registered", function (user) | 20 module:hook("user-registered", function (user) |
21 module:log("debug", "Notifying of new registration"); | 21 module:log("debug", "Notifying of new registration"); |