+
+ ModResult OnStats(char symbol, User* user, string_list &out) CXX11_OVERRIDE
+ {
+ if (symbol != 'G')
+ return MOD_RES_PASSTHRU;
+
+ unsigned int unknown = 0;
+ std::map<std::string, unsigned int> results;
+
+ const UserManager::LocalList& list = ServerInstance->Users.GetLocalUsers();
+ for (UserManager::LocalList::const_iterator i = list.begin(); i != list.end(); ++i)
+ {
+ std::string* cc = ext.get(*i);
+ if (cc)
+ results[*cc]++;
+ else
+ unknown++;
+ }
+
+ std::string p = "801 " + user->nick + " :GeoIPSTATS ";
+ for (std::map<std::string, unsigned int>::const_iterator i = results.begin(); i != results.end(); ++i)
+ {
+ out.push_back(p + i->first + " " + ConvToStr(i->second));
+ }
+
+ if (unknown)
+ out.push_back(p + "Unknown " + ConvToStr(unknown));
+
+ return MOD_RES_DENY;
+ }