summaryrefslogtreecommitdiff
path: root/modules/protocol
diff options
context:
space:
mode:
Diffstat (limited to 'modules/protocol')
-rw-r--r--modules/protocol/bahamut.cpp4
-rw-r--r--modules/protocol/inspircd-ts6.h9
-rw-r--r--modules/protocol/inspircd11.cpp4
-rw-r--r--modules/protocol/plexus.cpp4
-rw-r--r--modules/protocol/ratbox.cpp4
-rw-r--r--modules/protocol/unreal.cpp4
6 files changed, 17 insertions, 12 deletions
diff --git a/modules/protocol/bahamut.cpp b/modules/protocol/bahamut.cpp
index 6f785b37e..31be87086 100644
--- a/modules/protocol/bahamut.cpp
+++ b/modules/protocol/bahamut.cpp
@@ -158,9 +158,9 @@ class BahamutIRCdProto : public IRCDProto
}
/* TOPIC */
- 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) << "TOPIC " << c->name << " " << c->topic_setter << " " << c->topic_time << " :" << c->topic;
+ UplinkSocket::Message(bi) << "TOPIC " << c->name << " " << setter << " " << ts << " :" << topic;
}
/* UNSQLINE */
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
diff --git a/modules/protocol/inspircd11.cpp b/modules/protocol/inspircd11.cpp
index 1eb385e4b..971528a7b 100644
--- a/modules/protocol/inspircd11.cpp
+++ b/modules/protocol/inspircd11.cpp
@@ -94,9 +94,9 @@ class InspIRCdProto : public IRCDProto
UplinkSocket::Message(findbot(Config->OperServ)) << "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;
+ UplinkSocket::Message(bi) << "FTOPIC " << c->name << " " << ts << " " << setter << " :" << topic;
}
void SendVhostDel(User *u) anope_override
diff --git a/modules/protocol/plexus.cpp b/modules/protocol/plexus.cpp
index f0b213eab..291c3c6eb 100644
--- a/modules/protocol/plexus.cpp
+++ b/modules/protocol/plexus.cpp
@@ -223,9 +223,9 @@ class PlexusProto : public IRCDProto
UplinkSocket::Message(Me) << "ENCAP * SU " << u->GetUID();
}
- void SendTopic(BotInfo *bi, 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(bi) << "ENCAP * TOPIC " << c->name << " " << c->topic_setter << " " << c->topic_time + 1 << " :" << c->topic;
+ UplinkSocket::Message(bi) << "ENCAP * TOPIC " << c->name << " " << setter << " " << ts << " :" << topic;
}
void SendChannel(Channel *c) anope_override
diff --git a/modules/protocol/ratbox.cpp b/modules/protocol/ratbox.cpp
index a6fc85675..fc6cd788e 100644
--- a/modules/protocol/ratbox.cpp
+++ b/modules/protocol/ratbox.cpp
@@ -197,7 +197,7 @@ class RatboxProto : public IRCDProto
return true;
}
- void SendTopic(BotInfo *bi, Channel *c) anope_override
+ void SendTopic(BotInfo *bi, Channel *c, const Anope::string &topic, const Anope::string &setter, time_t &ts) anope_override
{
bool needjoin = c->FindUser(bi) == NULL;
if (needjoin)
@@ -206,7 +206,7 @@ class RatboxProto : public IRCDProto
status.SetFlag(CMODE_OP);
bi->Join(c, &status);
}
- IRCDProto::SendTopic(bi, c);
+ IRCDProto::SendTopic(bi, c, topic, setter, ts);
if (needjoin)
bi->Part(c);
}
diff --git a/modules/protocol/unreal.cpp b/modules/protocol/unreal.cpp
index 186fc8563..3f1ee2263 100644
--- a/modules/protocol/unreal.cpp
+++ b/modules/protocol/unreal.cpp
@@ -57,9 +57,9 @@ class UnrealIRCdProto : public IRCDProto
UplinkSocket::Message() << "BD - G " << x->GetUser() << " " << x->GetHost() << " " << Config->OperServ;
}
- 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) << ") " << c->name << " " << c->topic_setter << " " << c->topic_time + 1 << " :" << c->topic;
+ UplinkSocket::Message(bi) << "TOPIC " << c->name << " " << setter << " " << ts << " :" << topic;
}
void SendGlobalNotice(const BotInfo *bi, const Server *dest, const Anope::string &msg) anope_override