plugins: Use get_option_enum where appropriate

This commit is contained in:
Kim Alvefur 2021-01-16 21:04:58 +01:00
parent c4abd68e92
commit a8b0c56f65
5 changed files with 11 additions and 8 deletions

View file

@ -85,7 +85,7 @@ function module.add_host(module)
end
if env.connected then
local policy = module:get_option_string("component_conflict_resolve", "kick_new");
local policy = module:get_option_enum("component_conflict_resolve", "kick_new", "kick_old");
if policy == "kick_old" then
env.session:close{ condition = "conflict", text = "Replaced by a new connection" };
else -- kick_new