Software /
code /
prosody
Changeset
1397:4c7b8b8ab569
mod_announce: Work with non-local admins
author | Waqas Hussain <waqas20@gmail.com> |
---|---|
date | Tue, 23 Jun 2009 23:59:21 +0500 |
parents | 1396:ce3eb5f71899 |
children | 1398:141fec125af0 |
files | plugins/mod_announce.lua |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/plugins/mod_announce.lua Tue Jun 23 23:55:56 2009 +0500 +++ b/plugins/mod_announce.lua Tue Jun 23 23:59:21 2009 +0500 @@ -11,9 +11,9 @@ return; -- Not an announcement end - if not is_admin(origin.full_jid) then + if not is_admin(stanza.attr.from) then -- Not an admin? Not allowed! - module:log("warn", "Non-admin %s tried to send server announcement", tostring(jid.bare(origin.full_jid))); + module:log("warn", "Non-admin %s tried to send server announcement", tostring(jid.bare(stanza.attr.from))); origin.send(st.error_reply(stanza, "cancel", "service-unavailable")); return; end