plugins/mod_announce.lua

changeset 1397
4c7b8b8ab569
parent 1396
ce3eb5f71899
child 1522
569d58d21612
--- 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

mercurial