aboutsummaryrefslogtreecommitdiffstats
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
commitb9d5e182b80b66aafb638d765deb87f3bff9dc9c (patch)
tree86057c5f198caad76f2b40fff64fd6cabd69d5f8
parent10f8cb0c57645b6e307bff244323766257564839 (diff)
downloadprosody-b9d5e182b80b66aafb638d765deb87f3bff9dc9c.tar.gz
prosody-b9d5e182b80b66aafb638d765deb87f3bff9dc9c.zip
mod_bosh: Make into a normal module (fixes #402)
-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;
+ };
+});