Software /
code /
prosody-modules
Comparison
mod_storage_ldap/mod_storage_ldap.lua @ 813:2469f779b3f7
mod_storage_*: Update to use module:provides().
author | Waqas Hussain <waqas20@gmail.com> |
---|---|
date | Wed, 12 Sep 2012 23:58:01 +0500 |
parent | 809:1d51c5e38faa |
child | 2299:e099586f9de5 |
comparison
equal
deleted
inserted
replaced
812:0095b74a3685 | 813:2469f779b3f7 |
---|---|
165 | 165 |
166 ---------------------------------------- | 166 ---------------------------------------- |
167 -- Driver Definition -- | 167 -- Driver Definition -- |
168 ---------------------------------------- | 168 ---------------------------------------- |
169 | 169 |
170 local driver = { name = "ldap" }; | 170 local driver = {}; |
171 | 171 |
172 function driver:open(store, typ) | 172 function driver:open(store, typ) |
173 local adapter = adapters[store]; | 173 local adapter = adapters[store]; |
174 | 174 |
175 if adapter and not typ then | 175 if adapter and not typ then |
176 return adapter; | 176 return adapter; |
177 end | 177 end |
178 return nil, "unsupported-store"; | 178 return nil, "unsupported-store"; |
179 end | 179 end |
180 module:add_item("data-driver", driver); | 180 module:provides("storage", driver); |