From f09ea316dda61a162253b373689c05dfbfd29d6e Mon Sep 17 00:00:00 2001 From: Adam Date: Sat, 5 Nov 2016 10:34:09 -0400 Subject: irc2sql: update max topic len to 512 --- modules/extra/stats/irc2sql/tables.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modules') 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," -- cgit From 7453c71c005671f729e26f2bbeeb750d32c88718 Mon Sep 17 00:00:00 2001 From: Adam Date: Sat, 5 Nov 2016 10:34:25 -0400 Subject: irc2sql: fix crash on shutdown with no sql --- modules/extra/stats/irc2sql/irc2sql.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'modules') diff --git a/modules/extra/stats/irc2sql/irc2sql.cpp b/modules/extra/stats/irc2sql/irc2sql.cpp index 99fb46da3..7baa191f5 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; } -- cgit