summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2017-04-07 14:29:31 -0400
committerAdam <Adam@anope.org>2017-04-07 14:29:31 -0400
commitaf48ee6c87ab10a7ffe25d93e2bca688a0c656b0 (patch)
tree86597fc5ac292c77f9c0c9174189b5105d104a94 /modules
parent733e20147ae7342da3ae78c38789d53f7d4a12c7 (diff)
parent7453c71c005671f729e26f2bbeeb750d32c88718 (diff)
Merge commit '7453c71c005671f729e26f2bbeeb750d32c88718'
Diffstat (limited to 'modules')
-rw-r--r--modules/extra/stats/irc2sql/irc2sql.cpp3
-rw-r--r--modules/extra/stats/irc2sql/tables.cpp2
2 files changed, 3 insertions, 2 deletions
diff --git a/modules/extra/stats/irc2sql/irc2sql.cpp b/modules/extra/stats/irc2sql/irc2sql.cpp
index 3ad901f74..3596a4f4b 100644
--- a/modules/extra/stats/irc2sql/irc2sql.cpp
+++ b/modules/extra/stats/irc2sql/irc2sql.cpp
@@ -4,7 +4,8 @@ void IRC2SQL::OnShutdown()
{
// TODO: test if we really have to use blocking query here
// (sometimes m_mysql get unloaded before the other thread executed all queries)
- SQL::Result r = this->sql->RunQuery(SQL::Query("CALL " + prefix + "OnShutdown()"));
+ if (this->sql)
+ SQL::Result r = this->sql->RunQuery(SQL::Query("CALL " + prefix + "OnShutdown()"));
quitting = true;
}
diff --git a/modules/extra/stats/irc2sql/tables.cpp b/modules/extra/stats/irc2sql/tables.cpp
index bb7a8edd7..c58e09e23 100644
--- a/modules/extra/stats/irc2sql/tables.cpp
+++ b/modules/extra/stats/irc2sql/tables.cpp
@@ -87,7 +87,7 @@ void IRC2SQL::CheckTables()
query = "CREATE TABLE `" + prefix + "chan` ("
"`chanid` int(11) UNSIGNED NOT NULL AUTO_INCREMENT,"
"`channel` varchar(255) NOT NULL,"
- "`topic` varchar(255) DEFAULT NULL,"
+ "`topic` varchar(512) DEFAULT NULL,"
"`topicauthor` varchar(255) DEFAULT NULL,"
"`topictime` datetime DEFAULT NULL,"
"`modes` varchar(512) DEFAULT NULL,"