1
0
mirror of https://github.com/anope/anope.git synced 2026-07-09 01:43:12 +02:00

Add Service::GetServices.

This commit is contained in:
Sadie Powell
2024-12-13 10:57:19 +00:00
parent 69b94fe041
commit d0e24a50b8
+12
View File
@@ -68,6 +68,18 @@ public:
return keys;
}
static std::vector<Service *> GetServices(const Anope::string &t)
{
std::vector<Service *> values;
const auto it = Services.find(t);
if (it != Services.end())
{
for (const auto &[_, value] : it->second)
values.push_back(value);
}
return values;
}
static void AddAlias(const Anope::string &t, const Anope::string &n, const Anope::string &v)
{
std::map<Anope::string, Anope::string> &smap = Aliases[t];