# HG changeset patch # User Kim Alvefur # Date 1452874774 -3600 # Node ID 1831c7b23286d993c12d867569110dac8aa23e31 # Parent 891a5e925ae545be207e4229074974da46c12ddf mod_net_dovecotauth: Improve variable names for clarity diff -r 891a5e925ae5 -r 1831c7b23286 mod_net_dovecotauth/mod_net_dovecotauth.lua --- a/mod_net_dovecotauth/mod_net_dovecotauth.lua Fri Jan 15 17:19:17 2016 +0100 +++ b/mod_net_dovecotauth/mod_net_dovecotauth.lua Fri Jan 15 17:19:34 2016 +0100 @@ -18,7 +18,7 @@ local dump = require"util.serialization".serialize; -- Config -local vhost = module:get_option_string("dovecotauth_host", (next(hosts))); -- TODO Is there a better solution? +local default_vhost = module:get_option_string("dovecotauth_host", (next(hosts))); -- TODO Is there a better solution? local allow_master = module:get_option_boolean("dovecotauth_allow_master", false); -- Active sessions @@ -128,7 +128,7 @@ -- FIXME Should this be on a separate listener? local id = part(); local user = part(); - if user and user_exists(user, vhost) then + if user and user_exists(user, default_vhost) then self:send("USER", id); else self:send("NOTFOUND", id); @@ -149,7 +149,7 @@ function listener.onconnect(conn) s = new_session(conn); sessions[conn] = s; - local g_sasl = new_sasl(vhost, s); + local g_sasl = new_sasl(default_vhost, s); s.g_sasl = g_sasl; s:handshake(); end