mirror of
https://github.com/irssi/irssi.git
synced 2025-02-02 15:08:01 -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:
parent
8bfd16b374
commit
1d10483021
@ -319,6 +319,7 @@ static void ignore_remove_config(IGNORE_REC *rec)
|
|||||||
static void ignore_init_rec(IGNORE_REC *rec)
|
static void ignore_init_rec(IGNORE_REC *rec)
|
||||||
{
|
{
|
||||||
#ifdef HAVE_REGEX_H
|
#ifdef HAVE_REGEX_H
|
||||||
|
if (rec->regexp_compiled) regfree(&rec->preg);
|
||||||
rec->regexp_compiled = !rec->regexp || rec->pattern == NULL ? FALSE :
|
rec->regexp_compiled = !rec->regexp || rec->pattern == NULL ? FALSE :
|
||||||
regcomp(&rec->preg, rec->pattern,
|
regcomp(&rec->preg, rec->pattern,
|
||||||
REG_EXTENDED|REG_ICASE|REG_NOSUB) == 0;
|
REG_EXTENDED|REG_ICASE|REG_NOSUB) == 0;
|
||||||
@ -368,6 +369,7 @@ void ignore_update_rec(IGNORE_REC *rec)
|
|||||||
ignores = g_slist_append(ignores, rec);
|
ignores = g_slist_append(ignores, rec);
|
||||||
ignore_set_config(rec);
|
ignore_set_config(rec);
|
||||||
|
|
||||||
|
ignore_init_rec(rec);
|
||||||
signal_emit("ignore changed", 1, rec);
|
signal_emit("ignore changed", 1, rec);
|
||||||
nickmatch_rebuild(nickmatch);
|
nickmatch_rebuild(nickmatch);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user