Mercurial > prosody-modules
view mod_auth_external/examples/lua/prosody-auth-example.lua @ 3640:b2f32b3c6ec1
mod_smacks: fix bug in bad client handling introduced by last commit
Use absolute h-values instead of queue-count to determine if a new
request should be sent out or if we are looping instead.
author | tmolitor <thilo@eightysoft.de> |
---|---|
date | Fri, 02 Aug 2019 18:26:06 +0200 |
parents | b6280e8886f4 |
children |
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