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:
@@ -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();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user