diff options
author | Sadie Powell <sadie@witchery.services> | 2025-05-10 14:15:27 +0100 |
---|---|---|
committer | Sadie Powell <sadie@witchery.services> | 2025-05-27 15:30:09 +0100 |
commit | 50030e07fa51d3e8970ca044bf745f513501bfee (patch) | |
tree | 01eb1ac77e61314301688af9c081e46abcda9f38 /src/messages.cpp | |
parent | 7b2f0f579016f2d8cc8c919704cf1f75d74558db (diff) |
Diffstat (limited to 'src/messages.cpp')
-rw-r--r-- | src/messages.cpp | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/src/messages.cpp b/src/messages.cpp index 2ed52b3e7..ec2b255f8 100644 --- a/src/messages.cpp +++ b/src/messages.cpp @@ -340,16 +340,9 @@ void Privmsg::Run(MessageSource &source, const std::vector<Anope::string> ¶m Anope::string ctcpname, ctcpbody; if (Anope::ParseCTCP(message, ctcpname, ctcpbody)) { - if (ctcpname.equals_ci("PING")) - { - IRCD->SendNotice(bi, u->nick, Anope::FormatCTCP("PING", ctcpbody)); - } - else if (ctcpname.equals_ci("VERSION")) - { - Module *enc = ModuleManager::FindFirstOf(ENCRYPTION); - IRCD->SendNotice(bi, u->nick, Anope::FormatCTCP("VERSION", Anope::printf("Anope-%s %s -- %s -- %s", Anope::Version().c_str(), - Anope::VersionBuildString().c_str(), IRCD->GetProtocolName().c_str(), enc ? enc->name.c_str() : "(none)"))); - } + auto ctcpit = bi->ctcps.find(ctcpname); + if (ctcpit != bi->ctcps.end()) + ctcpit->second(bi, u, ctcpbody); return; } |