aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mod_announce.lua
diff options
context:
space:
mode:
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