diff options
author | Timo Sirainen <cras@irssi.org> | 2002-05-18 05:05:20 +0000 |
---|---|---|
committer | cras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564> | 2002-05-18 05:05:20 +0000 |
commit | 1d10483021cc6eaa3cc30de7bd518c9606b62e50 (patch) | |
tree | 1a73aedd90329ba2c2c843c2899eec484a2d03a7 | |
parent | 8bfd16b374855b148167262e9e5b4cc366bcaa59 (diff) | |
download | irssi-1d10483021cc6eaa3cc30de7bd518c9606b62e50.zip |
Updating existing ignore didn't recompile the regexp.
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2812 dbcabf3a-b0e7-0310-adc4-f8d773084564
-rw-r--r-- | src/core/ignore.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/core/ignore.c b/src/core/ignore.c index 96c56d9e..99986dd2 100644 --- a/src/core/ignore.c +++ b/src/core/ignore.c @@ -319,6 +319,7 @@ static void ignore_remove_config(IGNORE_REC *rec) static void ignore_init_rec(IGNORE_REC *rec) { #ifdef HAVE_REGEX_H + if (rec->regexp_compiled) regfree(&rec->preg); rec->regexp_compiled = !rec->regexp || rec->pattern == NULL ? FALSE : regcomp(&rec->preg, rec->pattern, REG_EXTENDED|REG_ICASE|REG_NOSUB) == 0; @@ -368,6 +369,7 @@ void ignore_update_rec(IGNORE_REC *rec) ignores = g_slist_append(ignores, rec); ignore_set_config(rec); + ignore_init_rec(rec); signal_emit("ignore changed", 1, rec); nickmatch_rebuild(nickmatch); } |