diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/conf_db.c | 10 | ||||
-rw-r--r-- | src/ircd.c | 2 | ||||
-rw-r--r-- | src/resv.c | 6 |
3 files changed, 12 insertions, 6 deletions
diff --git a/src/conf_db.c b/src/conf_db.c index a888b56..115b1d5 100644 --- a/src/conf_db.c +++ b/src/conf_db.c @@ -1073,3 +1073,13 @@ load_xline_database(void) close_db(f); } + +void +save_all_databases(void *unused) +{ + save_kline_database(); + save_dline_database(); + save_gline_database(); + save_xline_database(); + save_resv_database(); +} @@ -651,6 +651,8 @@ main(int argc, char *argv[]) /* Setup the timeout check. I'll shift it later :) -- adrian */ eventAddIsh("comm_checktimeouts", comm_checktimeouts, NULL, 1); + eventAddIsh("save_all_databases", save_all_databases, NULL, DATABASE_UPDATE_TIMEOUT); + if (ConfigServerHide.links_delay > 0) eventAddIsh("write_links_file", write_links_file, NULL, ConfigServerHide.links_delay); else @@ -73,9 +73,6 @@ create_channel_resv(char *name, char *reason, int in_conf) dlinkAdd(resv_p, &resv_p->node, &resv_channel_list); hash_add_resv(resv_p); - if (!in_conf) - save_resv_database(); - return conf; } @@ -109,9 +106,6 @@ create_nick_resv(char *name, char *reason, int in_conf) DupString(resv_p->reason, reason); resv_p->action = in_conf; - if (!in_conf) - save_resv_database(); - return conf; } |