plugins/mod_bosh.lua
changeset 8526 30671b378ab5
parent 8496 d424fe42b4d2
child 8527 81fff93d3bc6
--- 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 @@
 	</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;
+	};
+});