From 87478187af9f6f670ebf679ce7cc6cc29b21f7af Mon Sep 17 00:00:00 2001 From: Adam Date: Tue, 2 Oct 2012 22:16:35 -0400 Subject: Fix topiclock on inspircd --- modules/protocol/inspircd-ts6.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'modules/protocol/inspircd-ts6.h') diff --git a/modules/protocol/inspircd-ts6.h b/modules/protocol/inspircd-ts6.h index d011bf70b..bf545bd6c 100644 --- a/modules/protocol/inspircd-ts6.h +++ b/modules/protocol/inspircd-ts6.h @@ -92,9 +92,14 @@ class InspIRCdTS6Proto : public IRCDProto UplinkSocket::Message(bi) << "GLINE " << x->Mask; } - void SendTopic(BotInfo *whosets, Channel *c) anope_override + void SendTopic(BotInfo *bi, Channel *c, const Anope::string &topic, const Anope::string &setter, time_t &ts) anope_override { - UplinkSocket::Message(whosets) << "FTOPIC " << c->name << " " << c->topic_time << " " << c->topic_setter << " :" << c->topic; + /* Preferably we want to set the topic with a TS in the past (when re-setting the topic on channel creation etc) + * But if we have a previous topic and it is newer than the older TS we must bump the TS to now + */ + if (c->topic_time > ts) + ts = Anope::CurTime; + UplinkSocket::Message(bi) << "FTOPIC " << c->name << " " << ts << " " << setter << " :" << topic; } void SendVhostDel(User *u) anope_override -- cgit