diff options
| author | 2021-12-24 15:48:29 +0000 | |
|---|---|---|
| committer | 2021-12-24 22:41:21 +0000 | |
| commit | bab4ce4d5798bf27b74c874accaf8b83d6a1a740 (patch) | |
| tree | a0b662287734803c842d04de50a6ec5401601c49 /src/modules/m_geoclass.cpp | |
| parent | Convert the dnsbl module to use generic stats instead of RPL_TEXT. (diff) | |
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.
Diffstat (limited to 'src/modules/m_geoclass.cpp')
| -rw-r--r-- | src/modules/m_geoclass.cpp | 13 |
1 files changed, 5 insertions, 8 deletions
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; } |
