diff options
author | Sebastien Helleu <flashcode@flashtux.org> | 2008-10-24 18:17:10 +0200 |
---|---|---|
committer | Sebastien Helleu <flashcode@flashtux.org> | 2008-10-24 18:17:10 +0200 |
commit | 4c8b4d608002a44fba14e496e273f836e0849087 (patch) | |
tree | 9b33cddc12e8e76020712b2def1ed0994bd14250 /src/core/wee-config.c | |
parent | 77d90fc1bb25022341301f0ca9686b7769715276 (diff) | |
download | weechat-4c8b4d608002a44fba14e496e273f836e0849087.zip |
Add "enabled" flag for each filter (now possible to disable only one or some filters)
Diffstat (limited to 'src/core/wee-config.c')
-rw-r--r-- | src/core/wee-config.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/core/wee-config.c b/src/core/wee-config.c index b5bf36a6d..c884b15ab 100644 --- a/src/core/wee-config.c +++ b/src/core/wee-config.c @@ -706,7 +706,11 @@ config_weechat_filter_read (void *data, argv_eol = string_explode (value, ";", 1, 0, NULL); if (argv && argv_eol && (argc >= 3)) { - gui_filter_new (argv[0], argv[1], argv_eol[2]); + if (argc == 3) + gui_filter_new (1, argv[0], argv[1], argv_eol[2]); + else + gui_filter_new ((string_strcasecmp (argv[0], "on") == 0) ? 1 : 0, + argv[1], argv[2], argv_eol[3]); } if (argv) string_free_exploded (argv); @@ -737,7 +741,8 @@ config_weechat_filter_write (void *data, struct t_config_file *config_file, { config_file_write_line (config_file, "filter", - "%s;%s;%s", + "%s;%s;%s;%s", + (ptr_filter->enabled) ? "on" : "off", ptr_filter->buffer, ptr_filter->tags, ptr_filter->regex); |