mirror of
https://github.com/anope/anope.git
synced 2026-07-04 02:43:12 +02:00
BUILD : 1.7.4 (295) BUGS : none NOTES : Rolling back previous commit.
git-svn-id: svn://svn.anope.org/anope/trunk@295 31f1291d-b8d6-0310-a050-a5561fc1590b git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@184 5417fbe8-f217-4b02-8779-1006273d7864
This commit is contained in:
parent
a090c812cf
commit
3422f4a798
@@ -443,11 +443,25 @@ int listOut(User * u)
|
||||
/*************************************************************************/
|
||||
void delHostCore(char *nick)
|
||||
{
|
||||
#ifdef USE_RDB
|
||||
static char clause[128];
|
||||
#endif
|
||||
HostCore *tmp;
|
||||
boolean found = false;
|
||||
tmp = findHostCore(head, nick, &found);
|
||||
if (found) {
|
||||
head = deleteHostCore(head, tmp);
|
||||
|
||||
#ifdef USE_RDB
|
||||
/* Reflect this change in the database right away. */
|
||||
if (rdb_open()) {
|
||||
|
||||
snprintf(clause, sizeof(clause), "nick='%s'", nick);
|
||||
rdb_scrub_table("anope_hs_core", clause);
|
||||
rdb_close();
|
||||
}
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -609,6 +623,25 @@ void save_hs_dbase(void)
|
||||
|
||||
#undef SAFE
|
||||
|
||||
void save_hs_rdb_dbase(void)
|
||||
{
|
||||
#ifdef USE_RDB
|
||||
HostCore *current;
|
||||
|
||||
if (!rdb_open())
|
||||
return;
|
||||
|
||||
rdb_clear_table("anope_hs_core");
|
||||
|
||||
current = head;
|
||||
while (current != NULL) {
|
||||
rdb_save_hs_core(current);
|
||||
current = current->next;
|
||||
}
|
||||
rdb_close();
|
||||
#endif
|
||||
}
|
||||
|
||||
/*************************************************************************/
|
||||
/* End of Load/Save Functions */
|
||||
/*************************************************************************/
|
||||
|
||||
Reference in New Issue
Block a user