From bab4ce4d5798bf27b74c874accaf8b83d6a1a740 Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Fri, 24 Dec 2021 15:48:29 +0000 Subject: Convert the geoclass module to use generic stats instead of its own numeric. This numeric is non-standard and no software handles it so it is pretty pointless. --- src/modules/m_geoclass.cpp | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'src/modules/m_geoclass.cpp') diff --git a/src/modules/m_geoclass.cpp b/src/modules/m_geoclass.cpp index 1c570807f..39ec824dd 100644 --- a/src/modules/m_geoclass.cpp +++ b/src/modules/m_geoclass.cpp @@ -21,12 +21,6 @@ #include "modules/geolocation.h" #include "modules/stats.h" -enum -{ - // InspIRCd-specific. - RPL_STATSCOUNTRY = 801 -}; - class ModuleGeoClass final : public Module , public Stats::EventListener @@ -90,10 +84,13 @@ class ModuleGeoClass final } for (const auto& [location, count] : counts) - stats.AddRow(RPL_STATSCOUNTRY, count, location->GetCode(), location->GetName()); + { + stats.AddGenericRow(InspIRCd::Format("%s (%s): %lu", location->GetName().c_str(), + location->GetCode().c_str(), count)); + } if (unknown) - stats.AddRow(RPL_STATSCOUNTRY, unknown, "*", "Unknown Country"); + stats.AddGenericRow("Unknown Country: " + ConvToStr(unknown)); return MOD_RES_DENY; } -- cgit v1.3.1-10-gc9f91