|
|||
|
|||
|


Public Member Functions | |
| ModuleGeoIP (InspIRCd *Me) | |
| virtual | ~ModuleGeoIP () |
| virtual Version | GetVersion () |
| Returns the version number of a Module. | |
| virtual void | OnRehash (User *user, const std::string ¶meter) |
| Called on rehash. | |
| virtual int | OnUserRegister (User *user) |
| Called whenever a user is about to register their connection (e.g. | |
Private Attributes | |
| GeoIP * | gi |
| bool | banunknown |
| std::map< std::string, std::string > | GeoBans |
Definition at line 22 of file m_geoip.cpp.
|
|
Definition at line 32 of file m_geoip.cpp. References ModuleManager::Attach(), gi, I_OnRehash, I_OnUserRegister, InspIRCd::Modules, OnRehash(), and Module::ServerInstance. |
|
|
Definition at line 41 of file m_geoip.cpp. |
|
|
Returns the version number of a Module. The method should return a Version object with its version information assigned via Version::Version Reimplemented from Module. Definition at line 45 of file m_geoip.cpp. References API_VERSION, and VF_VENDOR. |
|
||||||||||||
|
Called on rehash. This method is called prior to a /REHASH or when a SIGHUP is received from the operating system. You should use it to reload any files so that your module keeps in step with the rest of the application. If a parameter is given, the core has done nothing. The module receiving the event can decide if this parameter has any relevence to it.
Reimplemented from Module. Definition at line 50 of file m_geoip.cpp. References banunknown, conf, ConfigReader::Enumerate(), GeoBans, ConfigReader::ReadFlag(), ConfigReader::ReadValue(), and Module::ServerInstance. Referenced by ModuleGeoIP(). |
|
|
Called whenever a user is about to register their connection (e.g. before the user is sent the MOTD etc). Modules can use this method if they are performing a function which must be done before the actual connection is completed (e.g. ident lookups, dnsbl lookups, etc). Note that you should NOT delete the user record here by causing a disconnection! Use OnUserConnect for that instead.
Reimplemented from Module. Definition at line 66 of file m_geoip.cpp. References banunknown, GeoBans, User::GetIPString(), gi, IS_LOCAL, UserManager::QuitUser(), Module::ServerInstance, and InspIRCd::Users. |
|
|
Definition at line 26 of file m_geoip.cpp. Referenced by OnRehash(), and OnUserRegister(). |
|
|
Definition at line 28 of file m_geoip.cpp. Referenced by OnRehash(), and OnUserRegister(). |
|
|
Definition at line 24 of file m_geoip.cpp. Referenced by ModuleGeoIP(), and OnUserRegister(). |