Mon, 22 Jun 2009 14:16:06 +0100
prosody: Switch anonymous_login check to use the new datamanager callback syntax
prosody | file | annotate | diff | comparison | revisions |
--- 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 --------------