aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mod_announce.lua
diff options
context:
space:
mode:
authorWaqas Hussain <waqas20@gmail.com>2009-06-23 23:59:21 +0500
committerWaqas Hussain <waqas20@gmail.com>2009-06-23 23:59:21 +0500
commit38fec5d17dcd4011f906f0bc32ca90449f19fb78 (patch)
tree8982d50412d98146f845012f7b4f09d28ff6dc6c /plugins/mod_announce.lua
parent030772c85ebd889b08df26c0ba51844336f2f1ed (diff)
downloadprosody-38fec5d17dcd4011f906f0bc32ca90449f19fb78.tar.gz
prosody-38fec5d17dcd4011f906f0bc32ca90449f19fb78.zip
mod_announce: Work with non-local admins
Diffstat (limited to 'plugins/mod_announce.lua')
-rw-r--r--plugins/mod_announce.lua4
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