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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user