Software / code / prosody
Comparison
plugins/mod_proxy65.lua @ 10111:0f335815244f
plugins: Remove tostring call from logging
Taken care of by loggingmanager now
Mass-rewrite using lua pattern like `tostring%b()`
| author | Kim Alvefur <zash@zash.se> |
|---|---|
| date | Tue, 30 Jul 2019 02:29:36 +0200 |
| parent | 9645:cc642c9c5ad5 |
| child | 11011:c079103c9172 |
comparison
equal
deleted
inserted
replaced
| 10110:3fa3872588a8 | 10111:0f335815244f |
|---|---|
| 115 local allow; | 115 local allow; |
| 116 for _, acl in ipairs(proxy_acl) do | 116 for _, acl in ipairs(proxy_acl) do |
| 117 if jid_compare(jid, acl) then allow = true; break; end | 117 if jid_compare(jid, acl) then allow = true; break; end |
| 118 end | 118 end |
| 119 if allow then break; end | 119 if allow then break; end |
| 120 module:log("warn", "Denying use of proxy for %s", tostring(stanza.attr.from)); | 120 module:log("warn", "Denying use of proxy for %s", stanza.attr.from); |
| 121 origin.send(st.error_reply(stanza, "auth", "forbidden")); | 121 origin.send(st.error_reply(stanza, "auth", "forbidden")); |
| 122 return true; | 122 return true; |
| 123 end | 123 end |
| 124 | 124 |
| 125 local proxy_port = next(portmanager.get_active_services():search("proxy65", nil)[1] or {}); | 125 local proxy_port = next(portmanager.get_active_services():search("proxy65", nil)[1] or {}); |