summaryrefslogtreecommitdiff
path: root/src/modules/extra
diff options
context:
space:
mode:
authorPeter Powell <petpow@saberuk.com>2018-04-07 15:14:53 +0100
committerPeter Powell <petpow@saberuk.com>2018-04-07 15:29:12 +0100
commit8c0426116cdf09e807da12b6b23d977c4a073119 (patch)
tree1703346cc14d202d0ad8a25b61d0b09acec037f2 /src/modules/extra
parent9c4cc196c073145d4ad2ae92fb2be2194cf621f4 (diff)
Fix some more oversights in m_geoip.
- Add the G: extban to the EXTBAN 005 token. - Use CXX11_OVERRIDE with ReadConfig and OnCheckBan. Thanks to @genius3000 for pointing these out.
Diffstat (limited to 'src/modules/extra')
-rw-r--r--src/modules/extra/m_geoip.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/modules/extra/m_geoip.cpp b/src/modules/extra/m_geoip.cpp
index 4b11e3df0..35efc8d70 100644
--- a/src/modules/extra/m_geoip.cpp
+++ b/src/modules/extra/m_geoip.cpp
@@ -95,7 +95,7 @@ class ModuleGeoIP : public Module, public Whois::EventListener
GeoIP_delete(gi);
}
- void ReadConfig(ConfigStatus&)
+ void ReadConfig(ConfigStatus&) CXX11_OVERRIDE
{
ConfigTag* tag = ServerInstance->Config->ConfValue("geoip");
extban = tag->getBool("extban");
@@ -106,7 +106,13 @@ class ModuleGeoIP : public Module, public Whois::EventListener
return Version("Provides a way to assign users to connect classes by country using GeoIP lookup", VF_OPTCOMMON|VF_VENDOR);
}
- ModResult OnCheckBan(User *user, Channel *c, const std::string& mask)
+ void On005Numeric(std::map<std::string, std::string>& tokens) CXX11_OVERRIDE
+ {
+ if (extban)
+ tokens["EXTBAN"].push_back('G');
+ }
+
+ ModResult OnCheckBan(User* user, Channel*, const std::string& mask) CXX11_OVERRIDE
{
if (extban && (mask.length() > 2) && (mask[0] == 'G') && (mask[1] == ':'))
{