diff options
| author | geniusdex geniusdex@31f1291d-b8d6-0310-a050-a5561fc1590b <geniusdex geniusdex@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864> | 2006-12-24 17:51:32 +0000 |
|---|---|---|
| committer | geniusdex geniusdex@31f1291d-b8d6-0310-a050-a5561fc1590b <geniusdex geniusdex@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864> | 2006-12-24 17:51:32 +0000 |
| commit | 4e409e31cb648962372b4b2b7315ab4e4f5478de (patch) | |
| tree | ee535e4c04e4a18bc1db163a129830232f10e052 /src/operserv.c | |
| parent | 6e7add309dd9d985666e1107bd5c840faa881137 (diff) | |
BUILD : 1.7.17 (1210) BUGS : 645 646 647 NOTES : Fixed anoperc restart, nickchanges on TS6, typo in CHAN_REGISTER_NONE_CHANNEL; added error messages when RDB functions fail (thx heinz)
git-svn-id: svn://svn.anope.org/anope/trunk@1210 31f1291d-b8d6-0310-a050-a5561fc1590b
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@929 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'src/operserv.c')
| -rw-r--r-- | src/operserv.c | 53 |
1 files changed, 42 insertions, 11 deletions
diff --git a/src/operserv.c b/src/operserv.c index e6c00a042..6f030b8cd 100644 --- a/src/operserv.c +++ b/src/operserv.c @@ -505,20 +505,51 @@ void save_os_rdb_dbase(void) if (!rdb_open()) return; - rdb_tag_table("anope_os_akills"); - rdb_tag_table("anope_os_sglines"); - rdb_tag_table("anope_os_sqlines"); - rdb_tag_table("anope_os_szlines"); + if (rdb_tag_table("anope_os_akills") == 0) { + alog("Unable to tag table 'anope_os_akills' - OperServ RDB save failed."); + return; + } + if (rdb_tag_table("anope_os_sglines") == 0) { + alog("Unable to tag table 'anope_os_sglines' - OperServ RDB save failed."); + return; + } + if (rdb_tag_table("anope_os_sqlines") == 0) { + alog("Unable to tag table 'anope_os_sqlines' - OperServ RDB save failed."); + return; + } + if (rdb_tag_table("anope_os_szlines") == 0) { + alog("Unable to tag table 'anope_os_szlines' - OperServ RDB save failed."); + return; + } /* We empty anope_os_core as required */ - rdb_empty_table("anope_os_core"); + if (rdb_empty_table("anope_os_core") == 0) { + alog("Unable to empty table 'anope_os_core' - OperServ RDB save failed"); + return; + } - rdb_save_os_db(maxusercnt, maxusertime, &akills, &sglines, &sqlines, - &szlines); + if (rdb_save_os_db + (maxusercnt, maxusertime, &akills, &sglines, &sqlines, + &szlines) == 0) { + alog("Unable to save OperServ data - OperServ RDB save failed"); + return; + } - rdb_clean_table("anope_os_akills"); - rdb_clean_table("anope_os_sglines"); - rdb_clean_table("anope_os_sqlines"); - rdb_clean_table("anope_os_szlines"); + if (rdb_clean_table("anope_os_akills") == 0) { + alog("Unable to clean table 'anope_os_akills' - OperServ RDB save failed."); + return; + } + if (rdb_clean_table("anope_os_sglines") == 0) { + alog("Unable to clean table 'anope_os_sglines' - OperServ RDB save failed."); + return; + } + if (rdb_clean_table("anope_os_sqlines") == 0) { + alog("Unable to clean table 'anope_os_sqlines' - OperServ RDB save failed."); + return; + } + if (rdb_clean_table("anope_os_szlines") == 0) { + alog("Unable to clean table 'anope_os_szlines' - OperServ RDB save failed."); + return; + } rdb_close(); #endif |
