Software /
code /
prosody
Changeset
5370:7838acadb0fa
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
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sat, 23 Mar 2013 01:27:16 +0100 |
parents | 5368:ab31dbb3a415 |
children | 5371:706206e191e8 |
files | plugins/mod_announce.lua plugins/mod_auth_anonymous.lua plugins/mod_c2s.lua plugins/mod_component.lua plugins/mod_iq.lua plugins/mod_message.lua plugins/mod_presence.lua plugins/mod_privacy.lua plugins/mod_tls.lua |
diffstat | 9 files changed, 12 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/plugins/mod_announce.lua Fri Mar 22 15:16:22 2013 +0000 +++ b/plugins/mod_announce.lua Sat Mar 23 01:27:16 2013 +0100 @@ -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)
--- a/plugins/mod_auth_anonymous.lua Fri Mar 22 15:16:22 2013 +0000 +++ b/plugins/mod_auth_anonymous.lua Sat Mar 23 01:27:16 2013 +0100 @@ -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 = {};
--- a/plugins/mod_c2s.lua Fri Mar 22 15:16:22 2013 +0000 +++ b/plugins/mod_c2s.lua Sat Mar 23 01:27:16 2013 +0100 @@ -29,6 +29,7 @@ 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 = {};
--- a/plugins/mod_component.lua Fri Mar 22 15:16:22 2013 +0000 +++ b/plugins/mod_component.lua Sat Mar 23 01:27:16 2013 +0100 @@ -19,7 +19,7 @@ local uuid_gen = require "util.uuid".generate; local core_process_stanza = prosody.core_process_stanza; - +local hosts = prosody.hosts; local log = module._log;
--- a/plugins/mod_iq.lua Fri Mar 22 15:16:22 2013 +0000 +++ b/plugins/mod_iq.lua Sat Mar 23 01:27:16 2013 +0100 @@ -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)
--- a/plugins/mod_message.lua Fri Mar 22 15:16:22 2013 +0000 +++ b/plugins/mod_message.lua Sat Mar 23 01:27:16 2013 +0100 @@ -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;
--- a/plugins/mod_presence.lua Fri Mar 22 15:16:22 2013 +0000 +++ b/plugins/mod_presence.lua Sat Mar 23 01:27:16 2013 +0100 @@ -19,7 +19,9 @@ 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";
--- a/plugins/mod_privacy.lua Fri Mar 22 15:16:22 2013 +0000 +++ b/plugins/mod_privacy.lua Sat Mar 23 01:27:16 2013 +0100 @@ -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;