prosody: Switch anonymous_login check to use the new datamanager callback syntax

Mon, 22 Jun 2009 14:16:06 +0100

author
Matthew Wild <mwild1@gmail.com>
date
Mon, 22 Jun 2009 14:16:06 +0100
changeset 1382
d900e0d8b475
parent 1381
46a58df8557d
child 1383
8774c5cbf147

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 --------------

mercurial