X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fextra%2Fm_geo_maxmind.cpp;h=86bb7bfca1ed5e96f67e11c912a85a94e0c58491;hb=772f7ceb94242a8ebfadd0d4e31209c0b51c2923;hp=0d164baa05e0688f7914ca2c052d95a738a8dca5;hpb=c5680d6493a07e6625cc84db0639811bb1a45aee;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/extra/m_geo_maxmind.cpp b/src/modules/extra/m_geo_maxmind.cpp index 0d164baa0..86bb7bfca 100644 --- a/src/modules/extra/m_geo_maxmind.cpp +++ b/src/modules/extra/m_geo_maxmind.cpp @@ -1,7 +1,7 @@ /* * InspIRCd -- Internet Relay Chat Daemon * - * Copyright (C) 2019 Sadie Powell + * Copyright (C) 2019-2021 Sadie Powell * Copyright (C) 2019 Matt Schatz * * This file is part of InspIRCd. InspIRCd is free software: you can @@ -17,7 +17,9 @@ * along with this program. If not, see . */ +/// $CompilerFlags: require_version("libmaxminddb" "0" "1.2.1") warning("The version of libmaxminddb you are using may cause a segmentation fault if given a corrupt database file!") /// $CompilerFlags: find_compiler_flags("libmaxminddb" "") + /// $LinkerFlags: find_linker_flags("libmaxminddb" "-lmaxminddb") /// $PackageInfo: require_system("arch") libmaxminddb pkgconf @@ -41,6 +43,12 @@ class GeolocationExtItem : public ExtensionItem { } + std::string ToHuman(const Extensible* container, void* item) const CXX11_OVERRIDE + { + Geolocation::Location* location = static_cast(item); + return location->GetName() + " [" + location->GetCode() + "]"; + } + void free(Extensible* container, void* item) CXX11_OVERRIDE { Geolocation::Location* old = static_cast(item);