diff options
author | Timo Sirainen <cras@irssi.org> | 2001-12-09 16:06:52 +0000 |
---|---|---|
committer | cras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564> | 2001-12-09 16:06:52 +0000 |
commit | e8696c711e3bd81ec65673ee611e13b6c7d154b2 (patch) | |
tree | 36108c7bd27e4b2eb425b50ec8d1403db6f51670 /src | |
parent | 6a1f6b560ff2e831d2f5156484c3c690800f7c84 (diff) | |
download | irssi-e8696c711e3bd81ec65673ee611e13b6c7d154b2.zip |
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
Diffstat (limited to 'src')
-rw-r--r-- | src/core/ignore.c | 9 |
1 files changed, 8 insertions, 1 deletions
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); |