Software / code / prosody-modules
File
mod_auth_external_insecure/examples/lua/prosody-auth-example.lua @ 4784:9a41cf08de24
mod_carbons: Obsolete this module, it is included in Prosody since 0.10
| author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> |
|---|---|
| date | Fri, 09 Jul 2021 18:27:18 +0200 |
| parent | 3884:f84ede3e9e3b |
line wrap: on
line source
local actions = {}; function actions.auth(data) local user, host, pass = data:match("^([^:]+):([^:]+):(.+)$"); if user == "someone" then return "1"; end end for line in io.lines() do local action, data = line:match("^([^:]+)(.*)$"); print(actions[action] and actions[action](data) or "0"); end