aboutsummaryrefslogtreecommitdiffstats
path: root/util/datamanager.lua
diff options
context:
space:
mode:
authorTobias Markmann <tm@ayena.de>2009-07-05 19:05:25 +0200
committerTobias Markmann <tm@ayena.de>2009-07-05 19:05:25 +0200
commitfa97be5e4dcd83cd57c51e764f6aa2a39b9833ba (patch)
tree04f1aa322632a0221c225ee6957b5863755a3b6d /util/datamanager.lua
parent4ce313959b678592a5fe0ef30b6813d058de45af (diff)
parent2c3ccf56744975a5f5acbc66d2e917e056467965 (diff)
downloadprosody-fa97be5e4dcd83cd57c51e764f6aa2a39b9833ba.tar.gz
prosody-fa97be5e4dcd83cd57c51e764f6aa2a39b9833ba.zip
Merge with main branch.
Diffstat (limited to 'util/datamanager.lua')
-rw-r--r--util/datamanager.lua8
1 files changed, 4 insertions, 4 deletions
diff --git a/util/datamanager.lua b/util/datamanager.lua
index 54cf1959..8e4b7828 100644
--- a/util/datamanager.lua
+++ b/util/datamanager.lua
@@ -62,7 +62,7 @@ end
local function callback(username, host, datastore, data)
for _, f in ipairs(callbacks) do
username, host, datastore, data = f(username, host, datastore, data);
- if not username then break; end
+ if username == false then break; end
end
return username, host, datastore, data;
@@ -123,7 +123,7 @@ function store(username, host, datastore, data)
end
username, host, datastore, data = callback(username, host, datastore, data);
- if not username then
+ if username == false then
return true; -- Don't save this data at all
end
@@ -147,7 +147,7 @@ end
function list_append(username, host, datastore, data)
if not data then return; end
- if callback and callback(username, host, datastore) then return true; end
+ if callback(username, host, datastore) == false then return true; end
-- save the datastore
local f, msg = io_open(getpath(username, host, datastore, "list", true), "a+");
if not f then
@@ -165,7 +165,7 @@ function list_store(username, host, datastore, data)
if not data then
data = {};
end
- if callback and callback(username, host, datastore) then return true; end
+ if callback(username, host, datastore) == false then return true; end
-- save the datastore
local f, msg = io_open(getpath(username, host, datastore, "list", true), "w+");
if not f then