Software /
code /
prosody
Diff
core/hostmanager.lua @ 1188:fa48e69c4786
core: hosts[*].events
author | Waqas Hussain <waqas20@gmail.com> |
---|---|
date | Wed, 20 May 2009 05:23:30 +0500 |
parent | 1095:cad4205f4925 |
child | 1467:fc420e9585c2 |
line wrap: on
line diff
--- a/core/hostmanager.lua Tue May 19 13:07:13 2009 +0100 +++ b/core/hostmanager.lua Wed May 20 05:23:30 2009 +0500 @@ -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 @@ 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