mirror of
https://github.com/irssi/irssi.git
synced 2024-11-03 04:27:19 -05:00
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
This commit is contained in:
parent
6a1f6b560f
commit
e8696c711e
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user