Comparison

plugins/mod_watchregistrations.lua @ 7268:29861845e0e0

mod_watchregistrations: Use type-specific config API for 'registration_notification'
author Kim Alvefur <zash@zash.se>
date Fri, 11 Mar 2016 13:37:18 +0100
parent 5776:bd0ff8ae98a8
child 7860:49ff363f3a3d
comparison
equal deleted inserted replaced
7267:8ad2dbc4fdb6 7268:29861845e0e0
9 9
10 local host = module:get_host(); 10 local host = module:get_host();
11 local jid_prep = require "util.jid".prep; 11 local jid_prep = require "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_notification = module:get_option("registration_notification", "User $username just registered on $host from $ip"); 14 local registration_notification = module:get_option_string("registration_notification", "User $username just registered on $host from $ip");
15 15
16 local st = require "util.stanza"; 16 local st = require "util.stanza";
17 17
18 module:hook("user-registered", function (user) 18 module:hook("user-registered", function (user)
19 module:log("debug", "Notifying of new registration"); 19 module:log("debug", "Notifying of new registration");