diff options
author | Sebastien Helleu <flashcode@flashtux.org> | 2006-08-26 08:38:04 +0000 |
---|---|---|
committer | Sebastien Helleu <flashcode@flashtux.org> | 2006-08-26 08:38:04 +0000 |
commit | bb021e567a9f062211eda9ef0ad2f753c15f271f (patch) | |
tree | 5e9eb9857ad9ad7362a5a56f0c124d61adccf490 /src/common | |
parent | 00fbd7ad56d4520bac6d7b8240ebf7148e2bc73f (diff) | |
download | weechat-bb021e567a9f062211eda9ef0ad2f753c15f271f.zip |
Values yes/no accepted (as on/off) for config boolean values (task #5454)
Diffstat (limited to 'src/common')
-rw-r--r-- | src/common/weeconfig.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/common/weeconfig.c b/src/common/weeconfig.c index 08b293a45..663d4cb89 100644 --- a/src/common/weeconfig.c +++ b/src/common/weeconfig.c @@ -1348,9 +1348,11 @@ config_option_set_value (t_config_option *option, char *value) switch (option->option_type) { case OPTION_TYPE_BOOLEAN: - if (ascii_strcasecmp (value, "on") == 0) + if ((ascii_strcasecmp (value, "on") == 0) + || (ascii_strcasecmp (value, "yes") == 0)) *(option->ptr_int) = BOOL_TRUE; - else if (ascii_strcasecmp (value, "off") == 0) + else if ((ascii_strcasecmp (value, "off") == 0) + || (ascii_strcasecmp (value, "no") == 0)) *(option->ptr_int) = BOOL_FALSE; else return -1; |