mod_websocket: Make this a shared module
authorFlorian Zeitz <florob@babelmonkeys.de>
Sun, 27 May 2012 17:17:52 +0200
changeset 688 e87678a52720
parent 687 d141375ece4b
child 689 4d21bd5dde49
mod_websocket: Make this a shared module
mod_websocket/mod_websocket.lua
--- a/mod_websocket/mod_websocket.lua	Sun May 27 17:09:19 2012 +0200
+++ b/mod_websocket/mod_websocket.lua	Sun May 27 17:17:52 2012 +0200
@@ -22,9 +22,6 @@
 local bxor = require "bit".bxor;
 local tohex = require "bit".tohex;
 
-module:depends("http")
-
-
 local xpcall, tostring, type = xpcall, tostring, type;
 local traceback = debug.traceback;
 
@@ -330,7 +327,8 @@
 	return "";
 end
 
-function module.load()
+function module.add_host(module)
+	module:depends("http");
 	module:provides("http", {
 		name = "xmpp-websocket";
 		route = {