|
|||
|
|||
|


Public Member Functions | |
| ModuleWaitPong (InspIRCd *Me) | |
| virtual void | OnRehash (User *user, const std::string ¶m) |
| Called on rehash. | |
| char * | RandString (unsigned int length) |
| virtual int | OnUserRegister (User *user) |
| Called whenever a user is about to register their connection (e.g. | |
| virtual int | OnPreCommand (std::string &command, std::vector< std::string > ¶meters, User *user, bool validated, const std::string &original_line) |
| Called whenever any command is about to be executed. | |
| virtual bool | OnCheckReady (User *user) |
| Called to check if a user who is connecting can now be allowed to register If any modules return false for this function, the user is held in the waiting state until all modules return true. | |
| virtual void | OnUserDisconnect (User *user) |
| Called whenever a user's socket is closed. | |
| virtual void | OnCleanup (int target_type, void *item) |
| Called before your module is unloaded to clean up Extensibles. | |
| virtual | ~ModuleWaitPong () |
| virtual Version | GetVersion () |
| Returns the version number of a Module. | |
Private Attributes | |
| bool | sendsnotice |
| bool | killonbadreply |
| const char * | extenstr |
Definition at line 18 of file m_conn_waitpong.cpp.
|
|
Definition at line 25 of file m_conn_waitpong.cpp. References ModuleManager::Attach(), I_OnCheckReady, I_OnCleanup, I_OnPreCommand, I_OnRehash, I_OnUserDisconnect, I_OnUserRegister, InspIRCd::Modules, OnRehash(), and Module::ServerInstance. |
|
|
Definition at line 132 of file m_conn_waitpong.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 136 of file m_conn_waitpong.cpp. References API_VERSION, and VF_VENDOR. |
|
|
Called to check if a user who is connecting can now be allowed to register If any modules return false for this function, the user is held in the waiting state until all modules return true. For example a module which implements ident lookups will continue to return false for a user until their ident lookup is completed. Note that the registration timeout for a user overrides these checks, if the registration timeout is reached, the user is disconnected even if modules report that the user is not ready to connect.
Reimplemented from Module. Definition at line 98 of file m_conn_waitpong.cpp. References extenstr, and Extensible::GetExt(). |
|
||||||||||||
|
Called before your module is unloaded to clean up Extensibles. This method is called once for every user and channel on the network, so that when your module unloads it may clear up any remaining data in the form of Extensibles added using Extensible::Extend(). If the target_type variable is TYPE_USER, then void* item refers to a User*, otherwise it refers to a Channel*.
Reimplemented from Module. Definition at line 116 of file m_conn_waitpong.cpp. References extenstr, Extensible::GetExt(), Extensible::Shrink(), and TYPE_USER. |
|
||||||||||||||||||||||||
|
Called whenever any command is about to be executed. This event occurs for all registered commands, wether they are registered in the core, or another module, and for invalid commands. Invalid commands may only be sent to this function when the value of validated is false. By returning 1 from this method you may prevent the command being executed. If you do this, no output is created by the core, and it is down to your module to produce any output neccessary. Note that unless you return 1, you should not destroy any structures (e.g. by using InspIRCd::QuitUser) otherwise when the command's handler function executes after your method returns, it will be passed an invalid pointer to the user object and crash!)
Reimplemented from Module. Definition at line 72 of file m_conn_waitpong.cpp. References extenstr, Extensible::GetExt(), killonbadreply, UserManager::QuitUser(), Module::ServerInstance, Extensible::Shrink(), and InspIRCd::Users. |
|
||||||||||||
|
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 33 of file m_conn_waitpong.cpp. References Conf, CONF_VALUE_NOT_FOUND, ConfigReader::GetError(), killonbadreply, ConfigReader::ReadFlag(), sendsnotice, and Module::ServerInstance. Referenced by ModuleWaitPong(). |
|
|
Called whenever a user's socket is closed. The details of the exiting user are available to you in the parameter User *user This event is called for all users, registered or not, as a cleanup method for modules which might assign resources to user, such as dns lookups, objects and sockets.
Reimplemented from Module. Definition at line 104 of file m_conn_waitpong.cpp. References extenstr, Extensible::GetExt(), and Extensible::Shrink(). |
|
|
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 59 of file m_conn_waitpong.cpp. References Extensible::Extend(), extenstr, User::nick, RandString(), sendsnotice, User::Write(), and User::WriteServ(). |
|
|
Definition at line 49 of file m_conn_waitpong.cpp. Referenced by OnUserRegister(). |
|
|
Definition at line 22 of file m_conn_waitpong.cpp. Referenced by OnCheckReady(), OnCleanup(), OnPreCommand(), OnUserDisconnect(), and OnUserRegister(). |
|
|
Definition at line 21 of file m_conn_waitpong.cpp. Referenced by OnPreCommand(), and OnRehash(). |
|
|
Definition at line 20 of file m_conn_waitpong.cpp. Referenced by OnRehash(), and OnUserRegister(). |