mirror of
https://github.com/weechat/weechat.git
synced 2026-07-05 17:23:15 +02:00
Added more values for config boolean values: y/true/t/1 and n/false/f/0 (patch from Stalwart)
This commit is contained in:
+10
-2
@@ -1349,10 +1349,18 @@ config_option_set_value (t_config_option *option, char *value)
|
||||
{
|
||||
case OPTION_TYPE_BOOLEAN:
|
||||
if ((ascii_strcasecmp (value, "on") == 0)
|
||||
|| (ascii_strcasecmp (value, "yes") == 0))
|
||||
|| (ascii_strcasecmp (value, "yes") == 0)
|
||||
|| (ascii_strcasecmp (value, "y") == 0)
|
||||
|| (ascii_strcasecmp (value, "true") == 0)
|
||||
|| (ascii_strcasecmp (value, "t") == 0)
|
||||
|| (ascii_strcasecmp (value, "1") == 0))
|
||||
*(option->ptr_int) = BOOL_TRUE;
|
||||
else if ((ascii_strcasecmp (value, "off") == 0)
|
||||
|| (ascii_strcasecmp (value, "no") == 0))
|
||||
|| (ascii_strcasecmp (value, "no") == 0)
|
||||
|| (ascii_strcasecmp (value, "n") == 0)
|
||||
|| (ascii_strcasecmp (value, "false") == 0)
|
||||
|| (ascii_strcasecmp (value, "f") == 0)
|
||||
|| (ascii_strcasecmp (value, "0") == 0))
|
||||
*(option->ptr_int) = BOOL_FALSE;
|
||||
else
|
||||
return -1;
|
||||
|
||||
Reference in New Issue
Block a user