1
0
mirror of https://github.com/irssi/irssi.git synced 2024-12-04 14:46:39 -05:00

Updating existing ignore didn't recompile the regexp.

git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2812 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
Timo Sirainen 2002-05-18 05:05:20 +00:00 committed by cras
parent 8bfd16b374
commit 1d10483021

View File

@ -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);
}