|
|||
|
|||
|


Public Member Functions | |
| ModuleSQLAuth (InspIRCd *Me) | |
| virtual | ~ModuleSQLAuth () |
| 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. | |
| void | SearchAndReplace (std::string &newline, const std::string &find, const std::string &replace) |
| bool | CheckCredentials (User *user) |
| virtual const char * | OnRequest (Request *request) |
| Called whenever a Request class is sent to your module by another module. | |
| virtual void | OnUserDisconnect (User *user) |
| Called whenever a user's socket is closed. | |
| 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 Version | GetVersion () |
| Returns the version number of a Module. | |
Private Attributes | |
| Module * | SQLutils |
| Module * | SQLprovider |
| std::string | freeformquery |
| std::string | killreason |
| std::string | allowpattern |
| std::string | databaseid |
| bool | verbose |
Definition at line 22 of file m_sqlauth.cpp.
|
|
Definition at line 35 of file m_sqlauth.cpp. References ModuleManager::Attach(), ModuleManager::Find(), ModuleManager::FindFeature(), I_OnCheckReady, I_OnRehash, I_OnRequest, I_OnUserDisconnect, I_OnUserRegister, InspIRCd::Modules, OnRehash(), Module::ServerInstance, SQLprovider, SQLutils, and ModuleManager::UseInterface(). |
|
|
Definition at line 54 of file m_sqlauth.cpp. References ModuleManager::DoneWithInterface(), InspIRCd::Modules, and Module::ServerInstance. |
|
|
Definition at line 100 of file m_sqlauth.cpp. References databaseid, SQLrequest::error, ModuleManager::Find(), freeformquery, User::GetIPString(), User::host, SQLrequest::id, User::ident, InspIRCd::Modules, User::nick, User::password, SearchAndReplace(), Request::Send(), Module::ServerInstance, InspIRCd::SNO, SQLprovider, SQLutils, SQLerror::Str(), verbose, and SnomaskManager::WriteToSnoMask(). Referenced by OnUserRegister(). |
|
|
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 210 of file m_sqlauth.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 205 of file m_sqlauth.cpp. References Extensible::GetExt(). |
|
||||||||||||
|
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 61 of file m_sqlauth.cpp. References allowpattern, Conf, databaseid, freeformquery, killreason, ConfigReader::ReadFlag(), ConfigReader::ReadValue(), Module::ServerInstance, and verbose. Referenced by ModuleSQLAuth(). |
|
|
Called whenever a Request class is sent to your module by another module. Please see the documentation of Request::Send() for further information. The Request sent can always be assumed to be non-NULL, you should not change the request object or its data. Your method may return arbitary data in the char* result which the requesting module may be able to use for pre-determined purposes (e.g. the results of an SQL query, etc).
Reimplemented from Module. Definition at line 154 of file m_sqlauth.cpp. References SQLresult::error, Extensible::Extend(), Extensible::GetExt(), Request::GetId(), User::host, SQLerror::Id(), SQLresult::id, User::ident, killreason, User::nick, UserManager::QuitUser(), SQLresult::Rows(), Module::ServerInstance, InspIRCd::SNO, SQL_NO_ERROR, SQLRESID, SQLSUCCESS, SQLutils, SQLerror::Str(), InspIRCd::Users, verbose, and SnomaskManager::WriteToSnoMask(). |
|
|
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 199 of file m_sqlauth.cpp. References 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 72 of file m_sqlauth.cpp. References allowpattern, CheckCredentials(), Extensible::Extend(), killreason, InspIRCd::Match(), User::nick, UserManager::QuitUser(), Module::ServerInstance, and InspIRCd::Users. |
|
||||||||||||||||
|
Definition at line 88 of file m_sqlauth.cpp. Referenced by CheckCredentials(). |
|
|
Definition at line 29 of file m_sqlauth.cpp. Referenced by OnRehash(), and OnUserRegister(). |
|
|
Definition at line 30 of file m_sqlauth.cpp. Referenced by CheckCredentials(), and OnRehash(). |
|
|
Definition at line 27 of file m_sqlauth.cpp. Referenced by CheckCredentials(), and OnRehash(). |
|
|
Definition at line 28 of file m_sqlauth.cpp. Referenced by OnRehash(), OnRequest(), and OnUserRegister(). |
|
|
Definition at line 25 of file m_sqlauth.cpp. Referenced by CheckCredentials(), and ModuleSQLAuth(). |
|
|
Definition at line 24 of file m_sqlauth.cpp. Referenced by CheckCredentials(), ModuleSQLAuth(), and OnRequest(). |
|
|
Definition at line 32 of file m_sqlauth.cpp. Referenced by CheckCredentials(), OnRehash(), and OnRequest(). |