projects
/
prosody.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
mod_admin_adhoc: Mark 'accountjids' field as required in 'end user sessions' command...
[prosody.git]
/
plugins
/
mod_storage_internal.lua
diff --git
a/plugins/mod_storage_internal.lua
b/plugins/mod_storage_internal.lua
index cd778373659fed6621057ab511a0cfa0fa72e8ff..972ecbee33d1b1a71c7f5a8b582ff6bb4c99c6ec 100644
(file)
--- a/
plugins/mod_storage_internal.lua
+++ b/
plugins/mod_storage_internal.lua
@@
-2,11
+2,11
@@
local datamanager = require "core.storagemanager".olddm;
local host = module.host;
local host = module.host;
-local driver = {
name = "internal"
};
+local driver = {};
local driver_mt = { __index = driver };
local driver_mt = { __index = driver };
-function driver:open(store)
- return setmetatable({ store = store }, driver_mt);
+function driver:open(store
, typ
)
+ return setmetatable({ store = store
, type = typ
}, driver_mt);
end
function driver:get(user)
return datamanager.load(user, host, self.store);
end
function driver:get(user)
return datamanager.load(user, host, self.store);
@@
-16,8
+16,16
@@
function driver:set(user, data)
return datamanager.store(user, host, self.store, data);
end
return datamanager.store(user, host, self.store, data);
end
-function driver:
list_
stores(username)
- return datamanager.
list_
stores(username, host);
+function driver:stores(username)
+ return datamanager.stores(username, host);
end
end
-module:add_item("data-driver", driver);
+function driver:users()
+ return datamanager.users(host, self.store, self.type);
+end
+
+function driver:purge(user)
+ return datamanager.purge(user, host);
+end
+
+module:provides("storage", driver);