diff options
author | Adam <Adam@anope.org> | 2012-10-02 23:30:31 -0400 |
---|---|---|
committer | Adam <Adam@anope.org> | 2012-10-02 23:30:31 -0400 |
commit | 7551245f5715ecb6615e310c9e488efcabefd3b5 (patch) | |
tree | 2f71e4c0647c65b2b5e6758e6fc915819b7a55cc /modules | |
parent | 47bc551485f46f6195850be1c2a5edb1d8998e30 (diff) |
Attempt #2 at silly topic ts thing, this is actually must cleaner
Diffstat (limited to 'modules')
-rw-r--r-- | modules/extra/m_xmlrpc_main.cpp | 1 | ||||
-rw-r--r-- | modules/protocol/bahamut.cpp | 2 | ||||
-rw-r--r-- | modules/protocol/inspircd-ts6.h | 7 | ||||
-rw-r--r-- | modules/protocol/inspircd11.cpp | 2 | ||||
-rw-r--r-- | modules/protocol/plexus.cpp | 2 | ||||
-rw-r--r-- | modules/protocol/unreal.cpp | 2 |
6 files changed, 11 insertions, 5 deletions
diff --git a/modules/extra/m_xmlrpc_main.cpp b/modules/extra/m_xmlrpc_main.cpp index da2d09f22..dc12d565e 100644 --- a/modules/extra/m_xmlrpc_main.cpp +++ b/modules/extra/m_xmlrpc_main.cpp @@ -161,6 +161,7 @@ class MyXMLRPCEvent : public XMLRPCEvent request->reply("topicsetter", iface->Sanitize(c->topic_setter)); request->reply("topictime", stringify(c->topic_time)); + request->reply("topicts", stringify(c->topic_ts)); } } diff --git a/modules/protocol/bahamut.cpp b/modules/protocol/bahamut.cpp index 6f785b37e..d4d7b7703 100644 --- a/modules/protocol/bahamut.cpp +++ b/modules/protocol/bahamut.cpp @@ -160,7 +160,7 @@ class BahamutIRCdProto : public IRCDProto /* TOPIC */ void SendTopic(BotInfo *whosets, Channel *c) anope_override { - UplinkSocket::Message(whosets) << "TOPIC " << c->name << " " << c->topic_setter << " " << c->topic_time << " :" << c->topic; + UplinkSocket::Message(whosets) << "TOPIC " << c->name << " " << c->topic_setter << " " << c->topic_ts << " :" << c->topic; } /* UNSQLINE */ 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 diff --git a/modules/protocol/inspircd11.cpp b/modules/protocol/inspircd11.cpp index 1eb385e4b..3a3463ff8 100644 --- a/modules/protocol/inspircd11.cpp +++ b/modules/protocol/inspircd11.cpp @@ -96,7 +96,7 @@ class InspIRCdProto : public IRCDProto void SendTopic(BotInfo *whosets, Channel *c) anope_override { - UplinkSocket::Message(whosets) << "FTOPIC " << c->name << " " << c->topic_time << " " << c->topic_setter <<" :" << c->topic; + UplinkSocket::Message(whosets) << "FTOPIC " << c->name << " " << c->topic_time << " " << c->topic_ts <<" :" << c->topic; } void SendVhostDel(User *u) anope_override diff --git a/modules/protocol/plexus.cpp b/modules/protocol/plexus.cpp index f0b213eab..2444d3569 100644 --- a/modules/protocol/plexus.cpp +++ b/modules/protocol/plexus.cpp @@ -225,7 +225,7 @@ class PlexusProto : public IRCDProto void SendTopic(BotInfo *bi, Channel *c) anope_override { - UplinkSocket::Message(bi) << "ENCAP * TOPIC " << c->name << " " << c->topic_setter << " " << c->topic_time + 1 << " :" << c->topic; + UplinkSocket::Message(bi) << "ENCAP * TOPIC " << c->name << " " << c->topic_setter << " " << c->topic_ts << " :" << c->topic; } void SendChannel(Channel *c) anope_override diff --git a/modules/protocol/unreal.cpp b/modules/protocol/unreal.cpp index 186fc8563..edfe203ac 100644 --- a/modules/protocol/unreal.cpp +++ b/modules/protocol/unreal.cpp @@ -59,7 +59,7 @@ class UnrealIRCdProto : public IRCDProto void SendTopic(BotInfo *whosets, Channel *c) anope_override { - UplinkSocket::Message(whosets) << ") " << c->name << " " << c->topic_setter << " " << c->topic_time + 1 << " :" << c->topic; + UplinkSocket::Message(whosets) << ") " << c->name << " " << c->topic_setter << " " << c->topic_ts << " :" << c->topic; } void SendGlobalNotice(const BotInfo *bi, const Server *dest, const Anope::string &msg) anope_override |