- GeoBans.clear();
-
- ConfigReader conf;
-
- banunknown = conf.ReadFlag("geoip", "banunknown", 0);
-
- for (int i = 0; i < conf.Enumerate("geoban"); ++i)
- {
- std::string countrycode = conf.ReadValue("geoban", "country", i);
- std::string reason = conf.ReadValue("geoban", "reason", i);
- GeoBans[countrycode] = reason;
- }
+ std::string* cc = ext.get(user);
+ if (!cc)
+ cc = SetExt(user);
+
+ std::string geoip = myclass->config->getString("geoip");
+ if (geoip.empty())
+ return MOD_RES_PASSTHRU;
+ irc::commasepstream list(geoip);
+ std::string country;
+ while (list.GetToken(country))
+ if (country == *cc)
+ return MOD_RES_PASSTHRU;
+ return MOD_RES_DENY;