Software /
code /
prosody
Diff
util/datamanager.lua @ 1487:66f18c18befa
Merge with main branch.
author | Tobias Markmann <tm@ayena.de> |
---|---|
date | Sun, 05 Jul 2009 19:05:25 +0200 |
parent | 1462:44780b856ce7 |
child | 1523:841d61be198f |
line wrap: on
line diff
--- a/util/datamanager.lua Sun Jul 05 19:05:03 2009 +0200 +++ b/util/datamanager.lua Sun Jul 05 19:05:25 2009 +0200 @@ -62,7 +62,7 @@ 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 @@ 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 @@ 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 @@ 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