Software /
code /
prosody
Changeset
2249:6e0c861dc61f
mod_proxy65: Use new jid.join() from util.jid
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Fri, 27 Nov 2009 18:02:24 +0000 |
parents | 2248:37344b18b551 |
children | 2250:3196dabe8a36 |
files | plugins/mod_proxy65.lua |
diffstat | 1 files changed, 2 insertions(+), 15 deletions(-) [+] |
line wrap: on
line diff
--- a/plugins/mod_proxy65.lua Fri Nov 27 18:00:47 2009 +0000 +++ b/plugins/mod_proxy65.lua Fri Nov 27 18:02:24 2009 +0000 @@ -14,7 +14,7 @@ error("proxy65 should be loaded as a component, please see http://prosody.im/doc/components", 0); end -local jid_split = require "util.jid".split; +local jid_split, jid_join = require "util.jid".split, require "util.jid".join; local st = require "util.stanza"; local componentmanager = require "core.componentmanager"; local config_get = require "core.configmanager".get; @@ -137,19 +137,6 @@ return reply; end -local function _jid_join(node, host, resource) - local ret = host; - if ret then - if node then - ret = node .. "@" .. ret; - end - if resource then - ret = ret .. "/" .. resource; - end - end - return ret; -end - local function get_stream_host(origin, stanza) local reply = replies_cache.stream_host; local err_reply = replies_cache.stream_host_err; @@ -185,7 +172,7 @@ replies_cache.stream_host = reply; end else - module:log("warn", "Denying use of proxy for %s", tostring(_jid_join(jid_node, jid_host, jid_resource))); + module:log("warn", "Denying use of proxy for %s", tostring(jid_join(jid_node, jid_host, jid_resource))); if err_reply == nil then err_reply = st.iq({type="error", from=host}) :query("http://jabber.org/protocol/bytestreams")