Software /
code /
prosody
Changeset
5013:ab693eea0869
mod_admin_adhoc, mod_admin_telnet, mod_bosh, mod_c2s, mod_component, mod_pep, mod_presence, mod_roster, mod_s2s: Import core_post_stanza from the global prosody table.
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Thu, 26 Jul 2012 04:33:17 +0200 |
parents | 5012:d59c842fe38e |
children | 5014:b2006c1cfa85 |
files | plugins/mod_admin_adhoc.lua plugins/mod_admin_telnet.lua plugins/mod_bosh.lua plugins/mod_c2s.lua plugins/mod_component.lua plugins/mod_pep.lua plugins/mod_presence.lua plugins/mod_roster.lua plugins/mod_s2s/mod_s2s.lua |
diffstat | 9 files changed, 10 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/plugins/mod_admin_adhoc.lua Thu Jul 26 04:30:30 2012 +0200 +++ b/plugins/mod_admin_adhoc.lua Thu Jul 26 04:33:17 2012 +0200 @@ -23,6 +23,7 @@ local dataforms_new = require "util.dataforms".new; local array = require "util.array"; local modulemanager = require "modulemanager"; +local core_post_stanza = prosody.core_post_stanza; module:depends("adhoc"); local adhoc_new = module:require "adhoc".new;
--- a/plugins/mod_admin_telnet.lua Thu Jul 26 04:30:30 2012 +0200 +++ b/plugins/mod_admin_telnet.lua Thu Jul 26 04:33:17 2012 +0200 @@ -25,6 +25,7 @@ local commands = module:shared("commands") local def_env = module:shared("env"); local default_env_mt = { __index = def_env }; +local core_post_stanza = prosody.core_post_stanza; local function redirect_output(_G, session) local env = setmetatable({ print = session.print }, { __index = function (t, k) return rawget(_G, k); end });
--- a/plugins/mod_bosh.lua Thu Jul 26 04:30:30 2012 +0200 +++ b/plugins/mod_bosh.lua Thu Jul 26 04:33:17 2012 +0200 @@ -14,7 +14,7 @@ local sm_destroy_session = sm.destroy_session; local new_uuid = require "util.uuid".generate; local fire_event = prosody.events.fire_event; -local core_process_stanza = core_process_stanza; +local core_process_stanza = prosody.core_process_stanza; local st = require "util.stanza"; local logger = require "util.logger"; local log = logger.init("mod_bosh");
--- a/plugins/mod_c2s.lua Thu Jul 26 04:30:30 2012 +0200 +++ b/plugins/mod_c2s.lua Thu Jul 26 04:33:17 2012 +0200 @@ -28,6 +28,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 stream_callbacks = { default_ns = "jabber:client", handlestanza = core_process_stanza }; local listener = {};
--- a/plugins/mod_component.lua Thu Jul 26 04:30:30 2012 +0200 +++ b/plugins/mod_component.lua Thu Jul 26 04:33:17 2012 +0200 @@ -18,6 +18,8 @@ local new_xmpp_stream = require "util.xmppstream".new; local uuid_gen = require "util.uuid".generate; +local core_process_stanza = prosody.core_process_stanza; + local log = module._log; @@ -169,8 +171,6 @@ session:close(); end -local core_process_stanza = core_process_stanza; - function stream_callbacks.handlestanza(session, stanza) -- Namespaces are icky. if not stanza.attr.xmlns and stanza.name == "handshake" then
--- a/plugins/mod_pep.lua Thu Jul 26 04:30:30 2012 +0200 +++ b/plugins/mod_pep.lua Thu Jul 26 04:33:17 2012 +0200 @@ -17,6 +17,7 @@ local next = next; local type = type; local calculate_hash = require "util.caps".calculate_hash; +local core_post_stanza = prosody.core_post_stanza; local NULL = {}; local data = {};
--- a/plugins/mod_presence.lua Thu Jul 26 04:30:30 2012 +0200 +++ b/plugins/mod_presence.lua Thu Jul 26 04:33:17 2012 +0200 @@ -14,6 +14,7 @@ local s_find = string.find; local tonumber = tonumber; +local core_post_stanza = prosody.core_post_stanza; local st = require "util.stanza"; local jid_split = require "util.jid".split; local jid_bare = require "util.jid".bare;
--- a/plugins/mod_roster.lua Thu Jul 26 04:30:30 2012 +0200 +++ b/plugins/mod_roster.lua Thu Jul 26 04:33:17 2012 +0200 @@ -18,7 +18,7 @@ local rm_remove_from_roster = require "core.rostermanager".remove_from_roster; local rm_add_to_roster = require "core.rostermanager".add_to_roster; local rm_roster_push = require "core.rostermanager".roster_push; -local core_post_stanza = core_post_stanza; +local core_post_stanza = prosody.core_post_stanza; module:add_feature("jabber:iq:roster");
--- a/plugins/mod_s2s/mod_s2s.lua Thu Jul 26 04:30:30 2012 +0200 +++ b/plugins/mod_s2s/mod_s2s.lua Thu Jul 26 04:33:17 2012 +0200 @@ -10,7 +10,7 @@ local prosody = prosody; local hosts = prosody.hosts; -local core_process_stanza = core_process_stanza; +local core_process_stanza = prosody.core_process_stanza; local tostring, type = tostring, type; local t_insert = table.insert;