diff options
author | Matthew Wild <mwild1@gmail.com> | 2009-05-03 01:11:21 +0100 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2009-05-03 01:11:21 +0100 |
commit | 67c94f50f4dfd8d3f3de0e84bafb56d37d5cdd83 (patch) | |
tree | 7aac7e2c38a5a98eb1c3d84103800a3a9e09e9d9 /core/hostmanager.lua | |
parent | 29b41d9efd7e4a84f043b38cfdb51893a4504616 (diff) | |
parent | 7be3d9f227ff8083e396497507dbdfe9a6049ca8 (diff) | |
download | prosody-67c94f50f4dfd8d3f3de0e84bafb56d37d5cdd83.tar.gz prosody-67c94f50f4dfd8d3f3de0e84bafb56d37d5cdd83.zip |
Merge with 0.4
Diffstat (limited to 'core/hostmanager.lua')
-rw-r--r-- | core/hostmanager.lua | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/core/hostmanager.lua b/core/hostmanager.lua index 1fec9799..97c742da 100644 --- a/core/hostmanager.lua +++ b/core/hostmanager.lua @@ -9,6 +9,8 @@ local pairs = pairs; module "hostmanager" +local hosts_loaded_once; + local function load_enabled_hosts(config) local defined_hosts = config or configmanager.getconfig(); @@ -18,13 +20,14 @@ local function load_enabled_hosts(config) end end eventmanager.fire_event("hosts-activated", defined_hosts); + hosts_loaded_once = true; 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 = {} }; - log("info", "Activated host: %s", host); + log((hosts_loaded_once and "info") or "debug", "Activated host: %s", host); eventmanager.fire_event("host-activated", host, host_config); end |