# HG changeset patch # User Kim Alvefur # Date 1513175042 -3600 # Node ID 30671b378ab54e15568fb099d6c601ff6074e913 # Parent 073e517a1487973ce21433fd4bb9099fdcf9e223 mod_bosh: Make into a normal module (fixes #402) diff -r 073e517a1487 -r 30671b378ab5 plugins/mod_bosh.lua --- a/plugins/mod_bosh.lua Fri Feb 16 08:23:26 2018 +0100 +++ b/plugins/mod_bosh.lua Wed Dec 13 15:24:02 2017 +0100 @@ -6,8 +6,6 @@ -- COPYING file in the source package for more information. -- -module:set_global(); -- Global module - local hosts = _G.hosts; local new_xmpp_stream = require "util.xmppstream".new; local sm = require "core.sessionmanager"; @@ -512,17 +510,15 @@ ]]; }; -function module.add_host(module) - module:depends("http"); - module:provides("http", { - default_path = "/http-bind"; - route = { - ["GET"] = GET_response; - ["GET /"] = GET_response; - ["OPTIONS"] = handle_OPTIONS; - ["OPTIONS /"] = handle_OPTIONS; - ["POST"] = handle_POST; - ["POST /"] = handle_POST; - }; - }); -end +module:depends("http"); +module:provides("http", { + default_path = "/http-bind"; + route = { + ["GET"] = GET_response; + ["GET /"] = GET_response; + ["OPTIONS"] = handle_OPTIONS; + ["OPTIONS /"] = handle_OPTIONS; + ["POST"] = handle_POST; + ["POST /"] = handle_POST; + }; +});