aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mod_proxy65.lua
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2009-11-27 18:02:24 +0000
committerMatthew Wild <mwild1@gmail.com>2009-11-27 18:02:24 +0000
commit9d337d5a138b6fd7a29d630a48c5415086def06f (patch)
tree9f394f4ce616452e05ff4c3e149138d8229ea8a3 /plugins/mod_proxy65.lua
parent9657f766572002db4702011baf61d0862b061974 (diff)
downloadprosody-9d337d5a138b6fd7a29d630a48c5415086def06f.tar.gz
prosody-9d337d5a138b6fd7a29d630a48c5415086def06f.zip
mod_proxy65: Use new jid.join() from util.jid
Diffstat (limited to 'plugins/mod_proxy65.lua')
-rw-r--r--plugins/mod_proxy65.lua17
1 files changed, 2 insertions, 15 deletions
diff --git a/plugins/mod_proxy65.lua b/plugins/mod_proxy65.lua
index 4070dc1b..504cfc0c 100644
--- a/plugins/mod_proxy65.lua
+++ b/plugins/mod_proxy65.lua
@@ -14,7 +14,7 @@ if module:get_host_type() ~= "component" then
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 @@ local function get_disco_items(stanza)
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 @@ local function get_stream_host(origin, stanza)
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")