1
0
mirror of https://github.com/anope/anope.git synced 2026-06-26 05:26:37 +02:00

irc2sql: fixed incorrect usercount for channels and servers after netsplit, fixed not displaying the channelmodes

This commit is contained in:
DukePyrolator
2013-12-09 05:57:36 +01:00
parent 43f608ff2b
commit 1b4d62e2bc
3 changed files with 66 additions and 13 deletions
+10 -9
View File
@@ -4,15 +4,16 @@ void IRC2SQL::CheckTables()
{
Anope::string geoquery("");
/* TODO: remove the DropTable commands when the table layout is done
* perhaps we should drop/recreate some tables by default in case anope crashed
* and was unable to clear the content (ison)
* TRUNCATE could perform better for this?
*/
SQL::Result r;
r = this->sql->RunQuery(SQL::Query("DROP TABLE " + prefix + "user"));
r = this->sql->RunQuery(SQL::Query("DROP TABLE " + prefix + "chan"));
r = this->sql->RunQuery(SQL::Query("DROP TABLE " + prefix + "ison"));
if (firstrun)
{
/*
* drop/recreate some tables in case anope crashed
* and was unable to clear the content (ison)
*/
this->sql->RunQuery(SQL::Query("DROP TABLE " + prefix + "user"));
this->sql->RunQuery(SQL::Query("DROP TABLE " + prefix + "chan"));
this->sql->RunQuery(SQL::Query("DROP TABLE " + prefix + "ison"));
}
this->GetTables();