Software /
code /
prosody-modules
Changeset
3995:4c9805f29f2d
mod_muc_ban_ip: log fallback to module
author | Georg Lukas <georg@op-co.de> |
---|---|
date | Thu, 15 Aug 2019 09:26:02 +0200 |
parents | 3994:5a3dfb970888 |
children | 3996:42682505e692 |
files | mod_muc_ban_ip/mod_muc_ban_ip.lua |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- 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)