1
0
mirror of https://github.com/anope/anope.git synced 2026-07-05 14:03:13 +02:00

Fixed bug #1196 - truncate anope_extra before flushing data into it again

This commit is contained in:
Adam
2010-10-09 12:22:55 -04:00
parent b3dd5668f6
commit 5ca2df1edb
+1
View File
@@ -935,6 +935,7 @@ class DBMySQL : public Module
this->RunQuery("INSERT DELAYED INTO `anope_bs_core` (nick, user, host, rname, flags, created, chancount) VALUES('" + this->Escape(CurBot->nick) + "', '" + this->Escape(CurBot->GetIdent()) + "', '" + this->Escape(CurBot->host) + "', '" + this->Escape(CurBot->realname) + "', '" + GetBotServFlags(CurBot) + "', " + stringify(CurBot->created) + ", " + stringify(CurBot->chancount) + ") ON DUPLICATE KEY UPDATE nick=VALUES(nick), user=VALUES(user), host=VALUES(host), rname=VALUES(rname), flags=VALUES(flags), created=VALUES(created), chancount=VALUES(chancount)");
}
this->RunQuery("TRUNCATE TABLE `anope_extra`");
FOREACH_MOD(I_OnDatabaseWrite, OnDatabaseWrite(Write));
return EVENT_CONTINUE;