diff options
author | Ted Trask <ttrask01@yahoo.com> | 2013-10-18 22:41:50 +0000 |
---|---|---|
committer | Ted Trask <ttrask01@yahoo.com> | 2013-10-18 22:41:50 +0000 |
commit | 52313309b06d8b27f9fbe731b2159323eda33b38 (patch) | |
tree | f781d377c917e5004ef4e8f365be5571e8bb5038 /authenticator-freeswitch-vmail.lua | |
parent | 42aaaedefa366ca45f8cdc02be43968a02e3956c (diff) | |
download | acf-freeswitch-vmail-52313309b06d8b27f9fbe731b2159323eda33b38.tar.bz2 acf-freeswitch-vmail-52313309b06d8b27f9fbe731b2159323eda33b38.tar.xz |
Remove all calls to 'module' in preparation for move to Lua 5.2
Use mymodule parameter for module definition.
This was also helpful in revealing places where the code relied on the global environment.
Diffstat (limited to 'authenticator-freeswitch-vmail.lua')
-rw-r--r-- | authenticator-freeswitch-vmail.lua | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/authenticator-freeswitch-vmail.lua b/authenticator-freeswitch-vmail.lua index 423121d..14c3f2f 100644 --- a/authenticator-freeswitch-vmail.lua +++ b/authenticator-freeswitch-vmail.lua @@ -1,25 +1,26 @@ -- Copy of authenticator-plaintext, plus added authentication from voicemail DB -module (..., package.seeall) +local mymodule = {} +authenticator = require("authenticator") md5 = require("md5") -list_fields = function(self, tabl) +mymodule.list_fields = function(self, tabl) return nil end -read_field = function(self, tabl, field) +mymodule.read_field = function(self, tabl, field) return nil end -delete_field = function(self, tabl, field) +mymodule.delete_field = function(self, tabl, field) return false end -write_entry = function(self, tabl, field, id, entry) +mymodule.write_entry = function(self, tabl, field, id, entry) return false end -read_entry = function(self, tabl, field, id) +mymodule.read_entry = function(self, tabl, field, id) local result if tabl == authenticator.usertable and field == "" then -- authenticator is reading one user @@ -33,6 +34,8 @@ read_entry = function(self, tabl, field, id) return result end -delete_entry = function (self, tabl, field, id) +mymodule.delete_entry = function (self, tabl, field, id) return false end + +return mymodule |