diff options
author | Waqas Hussain <waqas20@gmail.com> | 2009-06-23 23:59:21 +0500 |
---|---|---|
committer | Waqas Hussain <waqas20@gmail.com> | 2009-06-23 23:59:21 +0500 |
commit | 38fec5d17dcd4011f906f0bc32ca90449f19fb78 (patch) | |
tree | 8982d50412d98146f845012f7b4f09d28ff6dc6c | |
parent | 030772c85ebd889b08df26c0ba51844336f2f1ed (diff) | |
download | prosody-38fec5d17dcd4011f906f0bc32ca90449f19fb78.tar.gz prosody-38fec5d17dcd4011f906f0bc32ca90449f19fb78.zip |
mod_announce: Work with non-local admins
-rw-r--r-- | plugins/mod_announce.lua | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/mod_announce.lua b/plugins/mod_announce.lua index 5ea61e28..010b45d9 100644 --- a/plugins/mod_announce.lua +++ b/plugins/mod_announce.lua @@ -11,9 +11,9 @@ function handle_announcement(data) 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 |