summaryrefslogtreecommitdiff
path: root/modules/protocol/inspircd-ts6.h
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2012-10-02 22:16:35 -0400
committerAdam <Adam@anope.org>2012-10-02 22:16:35 -0400
commit87478187af9f6f670ebf679ce7cc6cc29b21f7af (patch)
tree52568515b06b380ee57813b904b98ca04ebdaeab /modules/protocol/inspircd-ts6.h
parent7042223f2eb486e8d1aec9fd176d416096a6e927 (diff)
Fix topiclock on inspircd
Diffstat (limited to 'modules/protocol/inspircd-ts6.h')
-rw-r--r--modules/protocol/inspircd-ts6.h9
1 files changed, 7 insertions, 2 deletions
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