From e8696c711e3bd81ec65673ee611e13b6c7d154b2 Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Sun, 9 Dec 2001 16:06:52 +0000 Subject: [PATCH] Regexp-ignores weren't compiled at startup - thanks to Manoj Kasichainula for noticing this, I never tried restarting when trying to reproduce the regexp problems :) git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2226 dbcabf3a-b0e7-0310-adc4-f8d773084564 --- src/core/ignore.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/core/ignore.c b/src/core/ignore.c index d3f3f633..8c7c5d12 100644 --- a/src/core/ignore.c +++ b/src/core/ignore.c @@ -317,13 +317,18 @@ static void ignore_remove_config(IGNORE_REC *rec) if (node != NULL) iconfig_node_list_remove(node, ignore_index(rec)); } -void ignore_add_rec(IGNORE_REC *rec) +static void ignore_init_rec(IGNORE_REC *rec) { #ifdef HAVE_REGEX_H rec->regexp_compiled = !rec->regexp || rec->pattern == NULL ? FALSE : regcomp(&rec->preg, rec->pattern, REG_EXTENDED|REG_ICASE|REG_NOSUB) == 0; #endif +} + +void ignore_add_rec(IGNORE_REC *rec) +{ + ignore_init_rec(rec); ignores = g_slist_append(ignores, rec); ignore_set_config(rec); @@ -432,6 +437,8 @@ static void read_ignores(void) node = config_node_section(node, "channels", -1); if (node != NULL) rec->channels = config_node_get_list(node); + + ignore_init_rec(rec); } nickmatch_rebuild(nickmatch);