Software /
code /
prosody
Comparison
plugins/mod_watchregistrations.lua @ 4453:7dc743378e1e
mod_watchregistrations: Fixed an undefined global access (thanks Medics).
author | Waqas Hussain <waqas20@gmail.com> |
---|---|
date | Mon, 12 Dec 2011 14:53:12 +0500 |
parent | 4391:71083327f608 |
child | 4909:01bfb9a76660 |
comparison
equal
deleted
inserted
replaced
4452:7de17ca4de14 | 4453:7dc743378e1e |
---|---|
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; |