Software /
code /
prosody
Comparison
plugins/mod_storage_none.lua @ 5425:b00812c6daf8
mod_storage_none: A null-like storage provider that returns all stores as empty, and fails to save anything to them
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Fri, 05 Apr 2013 10:01:02 +0100 |
child | 6283:7cf6d3a2c855 |
comparison
equal
deleted
inserted
replaced
5424:7318527c6dea | 5425:b00812c6daf8 |
---|---|
1 local driver = {}; | |
2 local driver_mt = { __index = driver }; | |
3 | |
4 function driver:open(store) | |
5 return setmetatable({ store = store }, driver_mt); | |
6 end | |
7 function driver:get(user) | |
8 return {}; | |
9 end | |
10 | |
11 function driver:set(user, data) | |
12 return nil, "Storage disabled"; | |
13 end | |
14 | |
15 function driver:stores(username) | |
16 return { "roster" }; | |
17 end | |
18 | |
19 function driver:purge(user) | |
20 return true; | |
21 end | |
22 | |
23 module:provides("storage", driver); |