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/chanserv.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/chanserv.c')
| -rw-r--r-- | src/chanserv.c | 75 |
1 files changed, 60 insertions, 15 deletions
diff --git a/src/chanserv.c b/src/chanserv.c index 32c8a33cf..6add49727 100644 --- a/src/chanserv.c +++ b/src/chanserv.c @@ -998,27 +998,72 @@ void save_cs_rdb_dbase(void) if (!rdb_open()) return; - rdb_tag_table("anope_cs_info"); - rdb_tag_table("anope_cs_access"); - rdb_tag_table("anope_cs_levels"); - rdb_tag_table("anope_cs_akicks"); - rdb_tag_table("anope_cs_badwords"); - rdb_tag_table("anope_cs_ttb"); - rdb_tag_table_where("anope_ms_info", "serv='CHAN'"); + if (rdb_tag_table("anope_cs_info") == 0) { + alog("Unable to tag table 'anope_cs_info' - ChanServ RDB save failed."); + return; + } + if (rdb_tag_table("anope_cs_access") == 0) { + alog("Unable to tag table 'anope_cs_access' - ChanServ RDB save failed."); + return; + } + if (rdb_tag_table("anope_cs_levels") == 0) { + alog("Unable to tag table 'anope_cs_levels' - ChanServ RDB save failed."); + return; + } + if (rdb_tag_table("anope_cs_akicks") == 0) { + alog("Unable to tag table 'anope_cs_akicks' - ChanServ RDB save failed."); + return; + } + if (rdb_tag_table("anope_cs_badwords") == 0) { + alog("Unable to tag table 'anope_cs_badwords' - ChanServ RDB save failed."); + return; + } + if (rdb_tag_table("anope_cs_ttb") == 0) { + alog("Unable to tag table 'anope_cs_ttb' - ChanServ RDB save failed."); + return; + } + if (rdb_tag_table_where("anope_ms_info", "serv='CHAN'") == 0) { + alog("Unable to tag table 'anope_ms_info' - ChanServ RDB save failed."); + return; + } for (i = 0; i < 256; i++) { for (ci = chanlists[i]; ci; ci = ci->next) { - rdb_save_cs_info(ci); + if (rdb_save_cs_info(ci) == 0) { + alog("Unable to save ChanInfo for %s - ChanServ RDB save failed.", ci->name); + return; + } } /* for (chanlists[i]) */ } /* for (i) */ - rdb_clean_table("anope_cs_info"); - rdb_clean_table("anope_cs_access"); - rdb_clean_table("anope_cs_levels"); - rdb_clean_table("anope_cs_akicks"); - rdb_clean_table("anope_cs_badwords"); - rdb_clean_table("anope_cs_ttb"); - rdb_clean_table_where("anope_ms_info", "serv='CHAN'"); + if (rdb_clean_table("anope_cs_info") == 0) { + alog("Unable to clean table 'anope_cs_info' - ChanServ RDB save failed."); + return; + } + if (rdb_clean_table("anope_cs_access") == 0) { + alog("Unable to clean table 'anope_cs_access' - ChanServ RDB save failed."); + return; + } + if (rdb_clean_table("anope_cs_levels") == 0) { + alog("Unable to clean table 'anope_cs_levels' - ChanServ RDB save failed."); + return; + } + if (rdb_clean_table("anope_cs_akicks") == 0) { + alog("Unable to clean table 'anope_cs_akicks' - ChanServ RDB save failed."); + return; + } + if (rdb_clean_table("anope_cs_badwords") == 0) { + alog("Unable to clean table 'anope_cs_badwords' - ChanServ RDB save failed."); + return; + } + if (rdb_clean_table("anope_cs_ttb") == 0) { + alog("Unable to clean table 'anope_cs_ttb' - ChanServ RDB save failed."); + return; + } + if (rdb_clean_table_where("anope_ms_info", "serv='CHAN'") == 0) { + alog("Unable to clean table 'anope_ms_info' - ChanServ RDB save failed."); + return; + } rdb_close(); #endif |
