From 6b5592e19879047d6e3cd738862a5a155d53f98c Mon Sep 17 00:00:00 2001 From: Waqas Hussain Date: Wed, 20 May 2009 05:23:30 +0500 Subject: core: hosts[*].events --- core/hostmanager.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'core/hostmanager.lua') diff --git a/core/hostmanager.lua b/core/hostmanager.lua index 97c742da..a72e5f61 100644 --- a/core/hostmanager.lua +++ b/core/hostmanager.lua @@ -2,6 +2,7 @@ local hosts = hosts; local configmanager = require "core.configmanager"; local eventmanager = require "core.eventmanager"; +local events_new = require "util.events".new; local log = require "util.logger".init("hostmanager"); @@ -26,7 +27,7 @@ end eventmanager.add_event_hook("server-starting", load_enabled_hosts); function activate(host, host_config) - hosts[host] = {type = "local", connected = true, sessions = {}, host = host, s2sout = {} }; + hosts[host] = {type = "local", connected = true, sessions = {}, host = host, s2sout = {}, events = events_new() }; log((hosts_loaded_once and "info") or "debug", "Activated host: %s", host); eventmanager.fire_event("host-activated", host, host_config); end -- cgit v1.2.3