equal
deleted
inserted
replaced
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; |