Comparison

plugins/mod_watchregistrations.lua @ 4541:05f5ec99da77

Merge with trunk
author Matthew Wild <mwild1@gmail.com>
date Sun, 22 Jan 2012 22:55:49 +0000
parent 4453:7dc743378e1e
child 4909:01bfb9a76660
comparison
equal deleted inserted replaced
4530:40905e7bf680 4541:05f5ec99da77
16 16
17 module:hook("user-registered", function (user) 17 module:hook("user-registered", function (user)
18 module:log("debug", "Notifying of new registration"); 18 module:log("debug", "Notifying of new registration");
19 local message = st.message{ type = "chat", from = host } 19 local message = st.message{ type = "chat", from = host }
20 :tag("body") 20 :tag("body")
21 :text(registration_alert:gsub("%$(%w+)", function (v) 21 :text(registration_notification:gsub("%$(%w+)", function (v)
22 return user[v] or user.session and user.session[v] or nil; 22 return user[v] or user.session and user.session[v] or nil;
23 end)); 23 end));
24 for _, jid in ipairs(registration_watchers) do 24 for _, jid in ipairs(registration_watchers) do
25 module:log("debug", "Notifying %s", jid); 25 module:log("debug", "Notifying %s", jid);
26 message.attr.to = jid; 26 message.attr.to = jid;