summaryrefslogtreecommitdiff
path: root/modules/protocol/inspircd3.cpp
diff options
context:
space:
mode:
authorMatt Schatz <genius3000@g3k.solutions>2020-03-25 19:22:22 -0600
committerSadie Powell <sadie@witchery.services>2020-03-26 08:24:39 +0000
commit0d0763f72f52945a91b610d61729d658dafedfc1 (patch)
tree908dc43596eeb1aa57e1a0c26b4d932f6a987a68 /modules/protocol/inspircd3.cpp
parent4d101569f84b046d34bbcbab37904f6003519820 (diff)
Fix the handling of topic messages with InspIRCd v3.
Diffstat (limited to 'modules/protocol/inspircd3.cpp')
-rw-r--r--modules/protocol/inspircd3.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/modules/protocol/inspircd3.cpp b/modules/protocol/inspircd3.cpp
index 4312c8112..ec97eb0e1 100644
--- a/modules/protocol/inspircd3.cpp
+++ b/modules/protocol/inspircd3.cpp
@@ -1528,15 +1528,19 @@ struct IRCDMessageFMode : IRCDMessage
struct IRCDMessageFTopic : IRCDMessage
{
- IRCDMessageFTopic(Module *creator) : IRCDMessage(creator, "FTOPIC", 5) { }
+ IRCDMessageFTopic(Module *creator) : IRCDMessage(creator, "FTOPIC", 4) { SetFlag(IRCDMESSAGE_SOFT_LIMIT); }
void Run(MessageSource &source, const std::vector<Anope::string> &params) anope_override
{
- /* :source FTOPIC channel ts topicts setby :topic */
+ // :source FTOPIC channel ts topicts :topic
+ // :source FTOPIC channel ts topicts setby :topic (burst or RESYNC)
+
+ const Anope::string &setby = params.size() > 4 ? params[3] : source.GetName();
+ const Anope::string &topic = params.size() > 4 ? params[4] : params[3];
Channel *c = Channel::Find(params[0]);
if (c)
- c->ChangeTopicInternal(NULL, params[3], params[4], params[2].is_pos_number_only() ? convertTo<time_t>(params[2]) : Anope::CurTime);
+ c->ChangeTopicInternal(NULL, setby, topic, params[2].is_pos_number_only() ? convertTo<time_t>(params[2]) : Anope::CurTime);
}
};