|
|||
|
|||
|


Public Member Functions | |
| ModuleQuitBan (InspIRCd *Me) | |
| virtual | ~ModuleQuitBan () |
| virtual Version | GetVersion () |
| Returns the version number of a Module. | |
| virtual void | OnRehash (User *user, const std::string ¶meter) |
| Called on rehash. | |
| virtual void | OnUserConnect (User *u) |
| Called when a user connects. | |
| virtual void | OnGarbageCollect () |
| Called at intervals for modules to garbage-collect any hashes etc. | |
Private Attributes | |
| clonemap | connects |
| unsigned int | threshold |
| unsigned int | banduration |
| unsigned int | ipv4_cidr |
| unsigned int | ipv6_cidr |
Definition at line 19 of file m_connectban.cpp.
|
|
Definition at line 28 of file m_connectban.cpp. References ModuleManager::Attach(), I_OnGarbageCollect, I_OnRehash, I_OnUserConnect, InspIRCd::Modules, OnRehash(), and Module::ServerInstance. |
|
|
Definition at line 35 of file m_connectban.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 39 of file m_connectban.cpp. References API_VERSION, and VF_VENDOR. |
|
|
Called at intervals for modules to garbage-collect any hashes etc. Certain data types such as hash_map 'leak' buckets, which must be tidied up and freed by copying into a new item every so often. This method is called when it is time to do that. Reimplemented from Module. Definition at line 116 of file m_connectban.cpp. References connects, DEBUG, LogManager::Log(), InspIRCd::Logs, and Module::ServerInstance. |
|
||||||||||||
|
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 44 of file m_connectban.cpp. References banduration, Conf, InspIRCd::Duration(), ipv4_cidr, ipv6_cidr, ConfigReader::ReadInteger(), ConfigReader::ReadValue(), Module::ServerInstance, and threshold. Referenced by ModuleQuitBan(). |
|
|
Called when a user connects. The details of the connecting user are available to you in the parameter User *user
Reimplemented from Module. Definition at line 70 of file m_connectban.cpp. References XLineManager::AddLine(), XLineManager::ApplyLines(), banduration, InspIRCd::Config, connects, User::GetCIDRMask(), User::GetProtocolFamily(), ipv4_cidr, ipv6_cidr, Module::ServerInstance, ServerConfig::ServerName, InspIRCd::SNO, threshold, InspIRCd::Time(), SnomaskManager::WriteToSnoMask(), and InspIRCd::XLines. |
|
|
Definition at line 24 of file m_connectban.cpp. Referenced by OnRehash(), and OnUserConnect(). |
|
|
Definition at line 22 of file m_connectban.cpp. Referenced by OnGarbageCollect(), and OnUserConnect(). |
|
|
Definition at line 25 of file m_connectban.cpp. Referenced by OnRehash(), and OnUserConnect(). |
|
|
Definition at line 26 of file m_connectban.cpp. Referenced by OnRehash(), and OnUserConnect(). |
|
|
Definition at line 23 of file m_connectban.cpp. Referenced by OnRehash(), and OnUserConnect(). |