1
0
mirror of https://github.com/anope/anope.git synced 2026-06-26 08:36:39 +02:00

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
This commit is contained in:
crazycatdevs
2025-09-05 15:45:57 +02:00
committed by GitHub
parent dbef7a7c64
commit f03e802f58
+1 -1
View File
@@ -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);