diff options
Diffstat (limited to 'modules/protocol/inspircd3.cpp')
-rw-r--r-- | modules/protocol/inspircd3.cpp | 10 |
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> ¶ms) 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); } }; |