summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTimo Sirainen <cras@irssi.org>2002-05-18 04:16:51 +0000
committercras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564>2002-05-18 04:16:51 +0000
commitb96222b31138a7f05c2c5cfba0751b8e106a1c26 (patch)
tree260f90b70f33c89c629e83dfd9ca869dd923b66f
parent3eaeeac4f2683fc608460df6690f857270ca6a20 (diff)
downloadirssi-b96222b31138a7f05c2c5cfba0751b8e106a1c26.zip
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
-rw-r--r--src/core/ignore.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/core/ignore.c b/src/core/ignore.c
index cebbc3b0..bc35b861 100644
--- a/src/core/ignore.c
+++ b/src/core/ignore.c
@@ -264,7 +264,7 @@ static void ignore_set_config(IGNORE_REC *rec)
CONFIG_NODE *node;
char *levelstr;
- if (rec->level == 0 || rec->unignore_time > 0)
+ if (rec->level == 0)
return;
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->fullword) iconfig_node_set_bool(node, "fullword", 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) {
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->fullword = config_node_get_bool(node, "fullword", 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);
if (node != NULL) rec->channels = config_node_get_list(node);