aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2017-12-13 15:24:02 +0100
committerKim Alvefur <zash@zash.se>2017-12-13 15:24:02 +0100
commitc468196063ef69759758680038f583d8ed0aee21 (patch)
tree86057c5f198caad76f2b40fff64fd6cabd69d5f8 /plugins
parent6013ca9e240b4a0378513e83e4069a3ce67a0902 (diff)
downloadprosody-c468196063ef69759758680038f583d8ed0aee21.tar.gz
prosody-c468196063ef69759758680038f583d8ed0aee21.zip
mod_bosh: Make into a normal module (fixes #402)
Diffstat (limited to 'plugins')
-rw-r--r--plugins/mod_bosh.lua28
1 files changed, 12 insertions, 16 deletions
diff --git a/plugins/mod_bosh.lua b/plugins/mod_bosh.lua
index 2525d975..d75a9e45 100644
--- a/plugins/mod_bosh.lua
+++ b/plugins/mod_bosh.lua
@@ -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 @@ local GET_response = {
</body></html>]];
};
-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;
+ };
+});