mirror of
https://github.com/irssi/irssi.git
synced 2024-11-03 04:27:19 -05:00
save temporary ignores to config file with timestamp when to unignore.
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2809 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
parent
3eaeeac4f2
commit
b96222b311
@ -264,7 +264,7 @@ static void ignore_set_config(IGNORE_REC *rec)
|
|||||||
CONFIG_NODE *node;
|
CONFIG_NODE *node;
|
||||||
char *levelstr;
|
char *levelstr;
|
||||||
|
|
||||||
if (rec->level == 0 || rec->unignore_time > 0)
|
if (rec->level == 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
node = iconfig_node_traverse("(ignores", TRUE);
|
node = iconfig_node_traverse("(ignores", TRUE);
|
||||||
@ -281,6 +281,8 @@ static void ignore_set_config(IGNORE_REC *rec)
|
|||||||
if (rec->regexp) iconfig_node_set_bool(node, "regexp", TRUE);
|
if (rec->regexp) iconfig_node_set_bool(node, "regexp", TRUE);
|
||||||
if (rec->fullword) iconfig_node_set_bool(node, "fullword", TRUE);
|
if (rec->fullword) iconfig_node_set_bool(node, "fullword", TRUE);
|
||||||
if (rec->replies) iconfig_node_set_bool(node, "replies", TRUE);
|
if (rec->replies) iconfig_node_set_bool(node, "replies", TRUE);
|
||||||
|
if (rec->unignore_time != 0)
|
||||||
|
iconfig_node_set_int(node, "unignore_time", rec->unignore_time);
|
||||||
|
|
||||||
if (rec->channels != NULL && *rec->channels != NULL) {
|
if (rec->channels != NULL && *rec->channels != NULL) {
|
||||||
node = config_node_section(node, "channels", NODE_TYPE_LIST);
|
node = config_node_section(node, "channels", NODE_TYPE_LIST);
|
||||||
@ -424,6 +426,7 @@ static void read_ignores(void)
|
|||||||
rec->regexp = config_node_get_bool(node, "regexp", FALSE);
|
rec->regexp = config_node_get_bool(node, "regexp", FALSE);
|
||||||
rec->fullword = config_node_get_bool(node, "fullword", FALSE);
|
rec->fullword = config_node_get_bool(node, "fullword", FALSE);
|
||||||
rec->replies = config_node_get_bool(node, "replies", FALSE);
|
rec->replies = config_node_get_bool(node, "replies", FALSE);
|
||||||
|
rec->unignore_time = config_node_get_int(node, "unignore_time", 0);
|
||||||
|
|
||||||
node = config_node_section(node, "channels", -1);
|
node = config_node_section(node, "channels", -1);
|
||||||
if (node != NULL) rec->channels = config_node_get_list(node);
|
if (node != NULL) rec->channels = config_node_get_list(node);
|
||||||
|
Loading…
Reference in New Issue
Block a user