From f03e802f580d83d0b4cfc41c27c71e0040d35fbc Mon Sep 17 00:00:00 2001 From: crazycatdevs <44431938+crazycatdevs@users.noreply.github.com> Date: Fri, 5 Sep 2025 15:45:57 +0200 Subject: [PATCH] Fix creating channel entries in irc2sql. Related to #526 : MySQL doesn't accept the timestamp in topictime, must use FROM_UNIXTIME() like it's done in OnTopicUpdated --- modules/extra/stats/irc2sql/irc2sql.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/extra/stats/irc2sql/irc2sql.cpp b/modules/extra/stats/irc2sql/irc2sql.cpp index e1af50ae5..59e1982e0 100644 --- a/modules/extra/stats/irc2sql/irc2sql.cpp +++ b/modules/extra/stats/irc2sql/irc2sql.cpp @@ -198,7 +198,7 @@ void IRC2SQL::OnSetDisplayedHost(User *u) void IRC2SQL::OnChannelCreate(Channel *c) { query = "INSERT INTO `" + prefix + "chan` (channel, topic, topicauthor, topictime, modes) " - "VALUES (@channel@,@topic@,@topicauthor@,@topictime@,@modes@) " + "VALUES (@channel@,@topic@,@topicauthor@,FROM_UNIXTIME(@topictime@),@modes@) " "ON DUPLICATE KEY UPDATE channel=VALUES(channel), topic=VALUES(topic)," "topicauthor=VALUES(topicauthor), topictime=VALUES(topictime), modes=VALUES(modes)"; query.SetValue("channel", c->name);