diff options
author | Adam <Adam@anope.org> | 2010-10-09 12:22:55 -0400 |
---|---|---|
committer | Adam <Adam@anope.org> | 2010-10-09 12:22:55 -0400 |
commit | 5ca2df1edb1d1a053a82cc3ec11e1307c02c401c (patch) | |
tree | 4d4789e7364882f008ebe6cc126154cfe808cd98 | |
parent | b3dd5668f6679d2807e2598a0b0c42985e5736d2 (diff) |
Fixed bug #1196 - truncate anope_extra before flushing data into it again
-rw-r--r-- | modules/extra/db_mysql.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/modules/extra/db_mysql.cpp b/modules/extra/db_mysql.cpp index 2e99a5adc..92f0d1528 100644 --- a/modules/extra/db_mysql.cpp +++ b/modules/extra/db_mysql.cpp @@ -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; |