aboutsummaryrefslogtreecommitdiffstats
path: root/src/modules.cpp
diff options
context:
space:
mode:
authorGravatar Sadie Powell2026-04-04 18:15:30 +0100
committerGravatar Sadie Powell2026-04-04 18:15:30 +0100
commitab48b941f222dcedb7e169c054a102005e1af03c (patch)
treea481c70d1ae3073b1bc192e32e12010df20a2cc2 /src/modules.cpp
parentPass a server reference to OnRouteMessage. (diff)
downloadinspircd++-ab48b941f222dcedb7e169c054a102005e1af03c.tar.gz
inspircd++-ab48b941f222dcedb7e169c054a102005e1af03c.tar.bz2
inspircd++-ab48b941f222dcedb7e169c054a102005e1af03c.zip
Add insp::find_value, insp::to_ptr and switch code to use them.
Diffstat (limited to 'src/modules.cpp')
-rw-r--r--src/modules.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/modules.cpp b/src/modules.cpp
index f36b45f62..34b8f0700 100644
--- a/src/modules.cpp
+++ b/src/modules.cpp
@@ -610,10 +610,7 @@ void ModuleManager::DelService(Service::Provider& item)
Service::Provider* ModuleManager::FindService(const std::string& type, const std::string& name)
{
- auto i = this->Services.find(std::make_pair(type, name));
- if (i != this->Services.end())
- return i->second;
- return nullptr;
+ return insp::find_value(this->Services, std::make_pair(type, name));
}
std::string ModuleManager::ExpandModName(const std::string& modname)