]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_geoban.cpp
Update copyright headers.
[user/henk/code/inspircd.git] / src / modules / m_geoban.cpp
index 221d6f8001691bbeaef6b48aa25fb6ac030b6643..63f7de6ac1b2f733dd299bf8f2b0c394f37f910f 100644 (file)
@@ -1,7 +1,8 @@
 /*
  * InspIRCd -- Internet Relay Chat Daemon
  *
- *   Copyright (C) 2019 Peter Powell <petpow@saberuk.com>
+ *   Copyright (C) 2020 Matt Schatz <genius3000@g3k.solutions>
+ *   Copyright (C) 2019, 2021 Sadie Powell <sadie@witchery.services>
  *
  * This file is part of InspIRCd.  InspIRCd is free software: you can
  * redistribute it and/or modify it under the terms of the GNU General Public
@@ -43,7 +44,7 @@ class ModuleGeoBan
 
        Version GetVersion() CXX11_OVERRIDE
        {
-               return Version("Provides a way to ban users by country", VF_OPTCOMMON|VF_VENDOR);
+               return Version("Adds extended ban G: which matches against two letter country codes.", VF_OPTCOMMON|VF_VENDOR);
        }
 
        void On005Numeric(std::map<std::string, std::string>& tokens) CXX11_OVERRIDE
@@ -67,6 +68,9 @@ class ModuleGeoBan
 
        void OnWhois(Whois::Context& whois) CXX11_OVERRIDE
        {
+               if (whois.GetTarget()->server->IsULine())
+                       return;
+
                Geolocation::Location* location = geoapi ? geoapi->GetLocation(whois.GetTarget()) : NULL;
                if (location)
                        whois.SendLine(RPL_WHOISCOUNTRY, location->GetCode(), "is connecting from " + location->GetName());