changeset 688:e87678a52720

mod_websocket: Make this a shared module
author Florian Zeitz <florob@babelmonkeys.de>
date Sun, 27 May 2012 17:17:52 +0200
parents d141375ece4b
children 4d21bd5dde49
files mod_websocket/mod_websocket.lua
diffstat 1 files changed, 2 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- 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 = {