diff options
author | DukePyrolator <DukePyrolator@anope.org> | 2013-12-09 05:57:36 +0100 |
---|---|---|
committer | DukePyrolator <DukePyrolator@anope.org> | 2013-12-09 05:57:36 +0100 |
commit | 1b4d62e2bc8b146d19a683f0cef936ce706fef79 (patch) | |
tree | 2331193439b7bbdb8dd5a8c7c48589cddd94d076 /modules/stats/irc2sql/tables.cpp | |
parent | 43f608ff2bd08683c71ad089ebab68b324c8605e (diff) |
irc2sql: fixed incorrect usercount for channels and servers after netsplit, fixed not displaying the channelmodes
Diffstat (limited to 'modules/stats/irc2sql/tables.cpp')
-rw-r--r-- | modules/stats/irc2sql/tables.cpp | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/modules/stats/irc2sql/tables.cpp b/modules/stats/irc2sql/tables.cpp index 8b339f406..5bbdf9252 100644 --- a/modules/stats/irc2sql/tables.cpp +++ b/modules/stats/irc2sql/tables.cpp @@ -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(); |