From 7551245f5715ecb6615e310c9e488efcabefd3b5 Mon Sep 17 00:00:00 2001 From: Adam Date: Tue, 2 Oct 2012 23:30:31 -0400 Subject: Attempt #2 at silly topic ts thing, this is actually must cleaner --- modules/protocol/inspircd-ts6.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'modules/protocol/inspircd-ts6.h') diff --git a/modules/protocol/inspircd-ts6.h b/modules/protocol/inspircd-ts6.h index d011bf70b..37e4b1b48 100644 --- a/modules/protocol/inspircd-ts6.h +++ b/modules/protocol/inspircd-ts6.h @@ -94,7 +94,12 @@ class InspIRCdTS6Proto : public IRCDProto void SendTopic(BotInfo *whosets, Channel *c) anope_override { - UplinkSocket::Message(whosets) << "FTOPIC " << c->name << " " << c->topic_time << " " << c->topic_setter << " :" << c->topic; + /* If the last time a topic was set is after the TS we want for this topic we must bump this topic's timestamp to now */ + time_t ts = c->topic_ts; + if (c->topic_time > ts) + ts = Anope::CurTime; + /* But don't modify c->topic_ts, it should remain set to the real TS we want as ci->last_topic_time pulls from it */ + UplinkSocket::Message(whosets) << "FTOPIC " << c->name << " " << ts << " " << c->topic_setter << " :" << c->topic; } void SendVhostDel(User *u) anope_override -- cgit