1
0
mirror of https://github.com/weechat/weechat.git synced 2026-07-08 02:33:12 +02:00

fset: add filters "d=" and "d=="

This commit is contained in:
Sébastien Helleu
2017-05-29 22:32:07 +02:00
parent 4c65f2b648
commit 7df98862d6
2 changed files with 28 additions and 7 deletions
+18
View File
@@ -199,6 +199,24 @@ fset_option_match_filters (const char *config_name, const char *section_name,
/* filter by section name */
return (weechat_strcasecmp (section_name, fset_option_filter + 2) == 0) ? 1 : 0;
}
else if (strncmp (fset_option_filter, "d==", 3) == 0)
{
/* filter by modified values, exact value */
if (!fset_option_value_different_from_default (fset_option))
return 0;
return (weechat_strcasecmp (
(fset_option->value) ? fset_option->value : FSET_OPTION_VALUE_NULL,
fset_option_filter + 3) == 0) ? 1 : 0;
}
else if (strncmp (fset_option_filter, "d=", 2) == 0)
{
/* filter by modified values, value */
if (!fset_option_value_different_from_default (fset_option))
return 0;
return (weechat_strcasestr (
(fset_option->value) ? fset_option->value : FSET_OPTION_VALUE_NULL,
fset_option_filter + 2)) ? 1 : 0;
}
else if (strncmp (fset_option_filter, "d:", 2) == 0)
{
/* filter by modified values */