diff options
author | Kim Alvefur <zash@zash.se> | 2013-03-23 01:27:16 +0100 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2013-03-23 01:27:16 +0100 |
commit | 98dea85ed20b7a4ce764936a746d9ecc7408157b (patch) | |
tree | c34e9cecd87cba3d403c241eb2c8f226ae542a51 /plugins | |
parent | b1ce27375d21ac9d8fd923b9766b19cc938165d6 (diff) | |
download | prosody-98dea85ed20b7a4ce764936a746d9ecc7408157b.tar.gz prosody-98dea85ed20b7a4ce764936a746d9ecc7408157b.zip |
mod_announce, mod_auth_anonymous, mod_c2s, mod_c2s, mod_component, mod_iq, mod_message, mod_presence, mod_tls: Access prosody.{hosts,bare_sessions,full_sessions} instead of the old globals
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/mod_announce.lua | 1 | ||||
-rw-r--r-- | plugins/mod_auth_anonymous.lua | 1 | ||||
-rw-r--r-- | plugins/mod_c2s.lua | 1 | ||||
-rw-r--r-- | plugins/mod_component.lua | 2 | ||||
-rw-r--r-- | plugins/mod_iq.lua | 2 | ||||
-rw-r--r-- | plugins/mod_message.lua | 4 | ||||
-rw-r--r-- | plugins/mod_presence.lua | 4 | ||||
-rw-r--r-- | plugins/mod_privacy.lua | 3 | ||||
-rw-r--r-- | plugins/mod_tls.lua | 1 |
9 files changed, 12 insertions, 7 deletions
diff --git a/plugins/mod_announce.lua b/plugins/mod_announce.lua index 0872bd21..96976d6f 100644 --- a/plugins/mod_announce.lua +++ b/plugins/mod_announce.lua @@ -8,6 +8,7 @@ local st, jid = require "util.stanza", require "util.jid"; +local hosts = prosody.hosts; local is_admin = require "core.usermanager".is_admin; function send_to_online(message, host) diff --git a/plugins/mod_auth_anonymous.lua b/plugins/mod_auth_anonymous.lua index a327f438..c877d532 100644 --- a/plugins/mod_auth_anonymous.lua +++ b/plugins/mod_auth_anonymous.lua @@ -8,6 +8,7 @@ local new_sasl = require "util.sasl".new; local datamanager = require "util.datamanager"; +local hosts = prosody.hosts; -- define auth provider local provider = {}; diff --git a/plugins/mod_c2s.lua b/plugins/mod_c2s.lua index 89d678ca..4a3197d9 100644 --- a/plugins/mod_c2s.lua +++ b/plugins/mod_c2s.lua @@ -29,6 +29,7 @@ local opt_keepalives = module:get_option_boolean("tcp_keepalives", false); local sessions = module:shared("sessions"); local core_process_stanza = prosody.core_process_stanza; +local hosts = prosody.hosts; local stream_callbacks = { default_ns = "jabber:client", handlestanza = core_process_stanza }; local listener = {}; diff --git a/plugins/mod_component.lua b/plugins/mod_component.lua index 68d8a5de..871a20e4 100644 --- a/plugins/mod_component.lua +++ b/plugins/mod_component.lua @@ -19,7 +19,7 @@ local new_xmpp_stream = require "util.xmppstream".new; local uuid_gen = require "util.uuid".generate; local core_process_stanza = prosody.core_process_stanza; - +local hosts = prosody.hosts; local log = module._log; diff --git a/plugins/mod_iq.lua b/plugins/mod_iq.lua index 8044a533..e7901ab4 100644 --- a/plugins/mod_iq.lua +++ b/plugins/mod_iq.lua @@ -9,7 +9,7 @@ local st = require "util.stanza"; -local full_sessions = full_sessions; +local full_sessions = prosody.full_sessions; if module:get_host_type() == "local" then module:hook("iq/full", function(data) diff --git a/plugins/mod_message.lua b/plugins/mod_message.lua index 0b0ad8e4..e85da613 100644 --- a/plugins/mod_message.lua +++ b/plugins/mod_message.lua @@ -7,8 +7,8 @@ -- -local full_sessions = full_sessions; -local bare_sessions = bare_sessions; +local full_sessions = prosody.full_sessions; +local bare_sessions = prosody.bare_sessions; local st = require "util.stanza"; local jid_bare = require "util.jid".bare; diff --git a/plugins/mod_presence.lua b/plugins/mod_presence.lua index 23012750..b6e3fc18 100644 --- a/plugins/mod_presence.lua +++ b/plugins/mod_presence.lua @@ -19,7 +19,9 @@ local st = require "util.stanza"; local jid_split = require "util.jid".split; local jid_bare = require "util.jid".bare; local datetime = require "util.datetime"; -local hosts = hosts; +local hosts = prosody.hosts; +local bare_sessions = prosody.bare_sessions; +local full_sessions = prosody.full_sessions; local NULL = {}; local rostermanager = require "core.rostermanager"; diff --git a/plugins/mod_privacy.lua b/plugins/mod_privacy.lua index 2d696154..7ec94922 100644 --- a/plugins/mod_privacy.lua +++ b/plugins/mod_privacy.lua @@ -9,10 +9,9 @@ module:add_feature("jabber:iq:privacy"); -local prosody = prosody; local st = require "util.stanza"; local datamanager = require "util.datamanager"; -local bare_sessions, full_sessions = bare_sessions, full_sessions; +local bare_sessions, full_sessions = prosody.bare_sessions, prosody.full_sessions; local util_Jid = require "util.jid"; local jid_bare = util_Jid.bare; local jid_split, jid_join = util_Jid.split, util_Jid.join; diff --git a/plugins/mod_tls.lua b/plugins/mod_tls.lua index 707ae8f5..2fcf5f03 100644 --- a/plugins/mod_tls.lua +++ b/plugins/mod_tls.lua @@ -25,6 +25,7 @@ if secure_s2s_only then s2s_feature:tag("required"):up(); end local global_ssl_ctx = prosody.global_ssl_ctx; +local hosts = prosody.hosts; local host = hosts[module.host]; local function can_do_tls(session) |