From 05f81e425ccb058a8a944bfbe3eb604cb5d5e96b Mon Sep 17 00:00:00 2001
From: Kim Alvefur <zash@zash.se>
Date: Mon, 27 May 2019 12:05:35 +0200
Subject: mod_announce: Check for admin on current virtualhost instead of
 global (fixes #1365) (thanks yc)

---
 plugins/mod_announce.lua | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'plugins')

diff --git a/plugins/mod_announce.lua b/plugins/mod_announce.lua
index 14bb9f3d..970a273a 100644
--- a/plugins/mod_announce.lua
+++ b/plugins/mod_announce.lua
@@ -44,7 +44,7 @@ function handle_announcement(event)
 		return; -- Not an announcement
 	end
 
-	if not is_admin(stanza.attr.from) then
+	if not is_admin(stanza.attr.from, host) then
 		-- Not an admin? Not allowed!
 		module:log("warn", "Non-admin '%s' tried to send server announcement", stanza.attr.from);
 		return;
-- 
cgit v1.2.3