diff options
author | michael <michael@82007160-df01-0410-b94d-b575c5fd34c7> | 2012-11-01 13:49:25 +0000 |
---|---|---|
committer | michael <michael@82007160-df01-0410-b94d-b575c5fd34c7> | 2012-11-01 13:49:25 +0000 |
commit | ce8c0f1d6b42f2bdccc81ab5d939100bae4b1133 (patch) | |
tree | 94e39f452e21275edf28cc49f4224d26eaba6d36 /src | |
parent | f5bd3291ed24915d50718473d830b3c363def711 (diff) |
- dbs are now periodically flushed on disc every 5 minutes
git-svn-id: svn://svn.ircd-hybrid.org/svnroot/ircd-hybrid/trunk@1625 82007160-df01-0410-b94d-b575c5fd34c7
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; } |