--- a/mod_muc_ban_ip/mod_muc_ban_ip.lua Mon Apr 27 17:18:24 2020 +0200
+++ b/mod_muc_ban_ip/mod_muc_ban_ip.lua Thu Aug 15 09:26:02 2019 +0200
@@ -47,13 +47,13 @@
local ip = origin.ip;
local to = jid_bare(stanza.attr.to);
if ip_bans[ip] and ip_bans[ip][to] then
- origin.log("debug", "IP banned: %s is banned from %s", ip, to)
+ (origin.log or module._log)("debug", "IP banned: %s is banned from %s", ip, to)
origin.send(st.error_reply(stanza, "auth", "forbidden")
:tag("x", { xmlns = xmlns_muc_user })
:tag("status", { code = '301' }));
return true;
end
- origin.log("debug", "IP not banned: %s from %s", ip, to)
+ (origin.log or module._log)("debug", "IP not banned: %s from %s", ip, to)
end
function module.add_host(module)