]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/extra/m_geo_maxmind.cpp
Implement support for setting TLSv1.3 ciphersuites in ssl_openssl.
[user/henk/code/inspircd.git] / src / modules / extra / m_geo_maxmind.cpp
index 984a2c6cb32c6e8aee75caa21a970fca4d5f3da2..86bb7bfca1ed5e96f67e11c912a85a94e0c58491 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * InspIRCd -- Internet Relay Chat Daemon
  *
- *   Copyright (C) 2019 Sadie Powell <sadie@witchery.services>
+ *   Copyright (C) 2019-2021 Sadie Powell <sadie@witchery.services>
  *   Copyright (C) 2019 Matt Schatz <genius3000@g3k.solutions>
  *
  * This file is part of InspIRCd.  InspIRCd is free software: you can
@@ -17,7 +17,9 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
+/// $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<Geolocation::Location*>(item);
+               return location->GetName() + " [" + location->GetCode() + "]";
+       }
+
        void free(Extensible* container, void* item) CXX11_OVERRIDE
        {
                Geolocation::Location* old = static_cast<Geolocation::Location*>(item);
@@ -154,7 +162,7 @@ class ModuleGeoMaxMind : public Module
 
        Version GetVersion() CXX11_OVERRIDE
        {
-               return Version("Provides Geolocation lookups using the libMaxMindDB library", VF_VENDOR);
+               return Version("Allows the server to perform geolocation lookups on both IP addresses and users.", VF_VENDOR);
        }
 
        void ReadConfig(ConfigStatus& status) CXX11_OVERRIDE