Software /
code /
prosody
Diff
core/usermanager.lua @ 3293:4ce9d569a99c
usermanager: Expose host_handler() as initialize_host()
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Tue, 29 Jun 2010 19:11:18 +0100 |
parent | 3285:c116c4b2db5a |
child | 3336:3a8ce659edfc |
line wrap: on
line diff
--- a/core/usermanager.lua Thu Jun 24 03:33:09 2010 +0500 +++ b/core/usermanager.lua Tue Jun 29 19:11:18 2010 +0100 @@ -32,7 +32,7 @@ return setmetatable({name = "null"}, { __index = function() return dummy; end }); end -local function host_handler(host) +function initialize_host(host) local host_session = hosts[host]; host_session.events.add_handler("item-added/auth-provider", function (event) local provider = event.item; @@ -56,8 +56,8 @@ modulemanager.load(host, "auth_"..auth_provider); end end; -prosody.events.add_handler("host-activated", host_handler, 100); -prosody.events.add_handler("component-activated", host_handler, 100); +prosody.events.add_handler("host-activated", initialize_host, 100); +prosody.events.add_handler("component-activated", initialize_host, 100); function is_cyrus(host) return config.get(host, "core", "sasl_backend") == "cyrus"; end