comparison mod_muc_ban_ip/mod_muc_ban_ip.lua @ 4323:a7a06c8cea37

mod_muc_ban_ip: Lua is not C, fix typo
author Georg Lukas <georg@op-co.de>
date Mon, 11 Jan 2021 16:11:08 +0100
parents 71498f484c22
children 47d9f704d14b
comparison
equal deleted inserted replaced
4322:9606e7a63a69 4323:a7a06c8cea37
46 local origin, stanza = event.origin, event.stanza; 46 local origin, stanza = event.origin, event.stanza;
47 local ip = origin.ip; 47 local ip = origin.ip;
48 local to = jid_bare(stanza.attr.to); 48 local to = jid_bare(stanza.attr.to);
49 if ip_bans[ip] and ip_bans[ip][to] then 49 if ip_bans[ip] and ip_bans[ip][to] then
50 (origin.log or module._log)("debug", "IP banned: %s is banned from %s", ip, to) 50 (origin.log or module._log)("debug", "IP banned: %s is banned from %s", ip, to)
51 if stanza.attr.type != "error" then 51 if stanza.attr.type ~= "error" then
52 origin.send(st.error_reply(stanza, "auth", "forbidden") 52 origin.send(st.error_reply(stanza, "auth", "forbidden")
53 :tag("x", { xmlns = xmlns_muc_user }) 53 :tag("x", { xmlns = xmlns_muc_user })
54 :tag("status", { code = '301' })); 54 :tag("status", { code = '301' }));
55 end 55 end
56 return true; 56 return true;