aboutsummaryrefslogtreecommitdiffstats
path: root/src/modules
diff options
context:
space:
mode:
authorGravatar Sadie Powell2021-02-22 03:10:50 +0000
committerGravatar Sadie Powell2021-02-22 03:10:50 +0000
commit262ad80560b168da596a2c2874f07c9fe263bf35 (patch)
tree2e9c41d7610e5f747ab3191396585ef410e4a37d /src/modules
parentFix checking the wrong user in SERVLIST. (diff)
downloadinspircd++-262ad80560b168da596a2c2874f07c9fe263bf35.tar.gz
inspircd++-262ad80560b168da596a2c2874f07c9fe263bf35.tar.bz2
inspircd++-262ad80560b168da596a2c2874f07c9fe263bf35.zip
Add a human-readable serialiser to the geolocation extensible.
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/extra/m_geo_maxmind.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/modules/extra/m_geo_maxmind.cpp b/src/modules/extra/m_geo_maxmind.cpp
index 2850e0501..6f5d4ef20 100644
--- a/src/modules/extra/m_geo_maxmind.cpp
+++ b/src/modules/extra/m_geo_maxmind.cpp
@@ -43,6 +43,12 @@ class GeolocationExtItem : public ExtensionItem
{
}
+ std::string ToHuman(const Extensible* container, void* item) const CXX11_OVERRIDE
+ {
+ Geolocation::Location* location = static_cast<Geolocation::Location*>(item);
+ return location->GetName() + " [" + location->GetCode() + "]";
+ }
+
void free(Extensible* container, void* item) CXX11_OVERRIDE
{
Geolocation::Location* old = static_cast<Geolocation::Location*>(item);