402 end |
402 end |
403 end |
403 end |
404 return value; |
404 return value; |
405 end |
405 end |
406 |
406 |
407 function api:get_option_string(...) |
407 function api:get_option_string(name, default_value) |
408 local value = self:get_option(...); |
408 local value = self:get_option(name, default_value); |
409 if type(value) == "table" then |
409 if type(value) == "table" then |
410 if #value > 1 then |
410 if #value > 1 then |
411 self:log("error", "Config option '%s' does not take a list, using just the first item", name); |
411 self:log("error", "Config option '%s' does not take a list, using just the first item", name); |
412 end |
412 end |
413 value = value[1]; |
413 value = value[1]; |