comparison core/moduleapi.lua @ 14102:a124e80d3498

Merge 13.0->trunk
author Kim Alvefur <zash@zash.se>
date Wed, 11 Mar 2026 16:59:10 +0100
parents cf21d285385b 3e6bb6ffbd43
children 5aacae4b2ccf
comparison
equal deleted inserted replaced
14099:b5002c87db0b 14102:a124e80d3498
405 local value = self:get_option_scalar(name, default); 405 local value = self:get_option_scalar(name, default);
406 if value == nil then return nil; end 406 if value == nil then return nil; end
407 local options = set.new{default, ...}; 407 local options = set.new{default, ...};
408 if not options:contains(value) then 408 if not options:contains(value) then
409 self:log("error", "Config option '%s' not in set of allowed values (one of: %s)", name, options); 409 self:log("error", "Config option '%s' not in set of allowed values (one of: %s)", name, options);
410 return default;
410 end 411 end
411 return value; 412 return value;
412 end 413 end
413 414
414 function api:context(host) 415 function api:context(host)