Software /
code /
prosody
Changeset
1382:d900e0d8b475
prosody: Switch anonymous_login check to use the new datamanager callback syntax
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Mon, 22 Jun 2009 14:16:06 +0100 |
parents | 1381:46a58df8557d |
children | 1383:8774c5cbf147 |
files | prosody |
diffstat | 1 files changed, 5 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/prosody Mon Jun 22 14:15:33 2009 +0100 +++ b/prosody Mon Jun 22 14:16:06 2009 +0100 @@ -135,8 +135,11 @@ local data_path = config.get("*", "core", "data_path") or CFG_DATADIR or "data"; require "util.datamanager".set_data_path(data_path); -require "util.datamanager".set_callback(function(username, host, datastore) - return config.get(host, "core", "anonymous_login"); +require "util.datamanager".add_callback(function(username, host, datastore, data) + if config.get(host, "core", "anonymous_login") then + return false; + end + return username, host, datastore, data; end); ----------- End of out-of-place code --------------