Comparison

mod_muc_log/mod_muc_log.lua @ 53:5c4dd39a1e99

mod_muc_log: Use new httpserver.new_from_config syntax
author Matthew Wild <mwild1@gmail.com>
date Sun, 18 Oct 2009 23:24:42 +0100
parent 52:11d1d4ff8037
child 54:f15108153710
comparison
equal deleted inserted replaced
52:11d1d4ff8037 53:5c4dd39a1e99
301 end 301 end
302 return; 302 return;
303 end 303 end
304 304
305 function module.load() 305 function module.load()
306 config = config_get("*", "core", "muc_log"); 306 config = config_get("*", "core", "muclogging");
307 -- module:log("debug", "muc_log config: \n%s", dump(config)); 307 -- module:log("debug", "muclogging config: \n%s", dump(config));
308 308
309 if config.http_port ~= nil then 309 httpserver.new_from_config({ config.http_port or true }, handle_request, { base = "muc_log" });
310 httpserver.new_from_config({ config.http_port }, "muc_log", handle_request);
311 end
312 return validateLogFolder(); 310 return validateLogFolder();
313 end 311 end
314 312
315 module:hook("pre-message/bare", logIfNeeded, 500); 313 module:hook("pre-message/bare", logIfNeeded, 500);
316 module:hook("pre-presence/full", logIfNeeded, 500); 314 module:hook("pre-presence/full", logIfNeeded, 500);