mirror of
https://github.com/bjc/prosody.git
synced 2025-04-03 21:27:38 +03:00
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
This commit is contained in:
parent
68a7de369b
commit
27dc3a5b9a
9 changed files with 12 additions and 7 deletions
|
@ -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)
|
||||
|
|
|
@ -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 = {};
|
||||
|
|
|
@ -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 = {};
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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";
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue