aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mod_component.lua
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2009-04-29 02:08:12 +0100
committerMatthew Wild <mwild1@gmail.com>2009-04-29 02:08:12 +0100
commite241b85a56b96bbda1719448a08e68cf5b8eed56 (patch)
tree5564cfe35e899b0932ba57718ae84eccf417c7c8 /plugins/mod_component.lua
parent3ba4121e11d4696a40e59486db4f005bf2c7eccd (diff)
downloadprosody-e241b85a56b96bbda1719448a08e68cf5b8eed56.tar.gz
prosody-e241b85a56b96bbda1719448a08e68cf5b8eed56.zip
mod_*: Fix many unnecessary global accesses in modules (already committed to main repo)
Diffstat (limited to 'plugins/mod_component.lua')
-rw-r--r--plugins/mod_component.lua11
1 files changed, 8 insertions, 3 deletions
diff --git a/plugins/mod_component.lua b/plugins/mod_component.lua
index bbd49c5e..e5ea47a2 100644
--- a/plugins/mod_component.lua
+++ b/plugins/mod_component.lua
@@ -10,14 +10,19 @@ if module:get_host_type() ~= "component" then
error("Don't load mod_component manually, it should be for a component, please see http://prosody.im/doc/components", 0);
end
+local hosts = _G.hosts;
+
local t_concat = table.concat;
+local lxp = require "lxp";
+local logger = require "util.logger";
+local config = require "core.configmanager";
local connlisteners = require "net.connlisteners";
local cm_register_component = require "core.componentmanager".register_component;
local cm_deregister_component = require "core.componentmanager".deregister_component;
local uuid_gen = require "util.uuid".generate;
local sha1 = require "util.hashes".sha1;
-local st = stanza;
+local st = require "util.stanza";
local init_xmlhandlers = require "core.xmlhandlers";
local sessions = {};
@@ -211,8 +216,8 @@ connlisteners.register('component', component_listener);
module:add_event_hook("server-started",
function ()
- if net_activate_ports then
- net_activate_ports("component", "component", {5437}, "tcp");
+ if _G.net_activate_ports then
+ _G.net_activate_ports("component", "component", {5437}, "tcp");
else
error("No net_activate_ports: Using an incompatible version of Prosody?");
end