diff mod_websocket/mod_websocket.lua @ 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
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 = {