|
|||
|
|||
|


Public Member Functions | |
| ModuleSQLOper (InspIRCd *Me) | |
| bool | OneOfMatches (const char *host, const char *ip, const char *hostlist) |
| virtual void | OnLoadModule (Module *mod, const std::string &name) |
| Called whenever a module is loaded. | |
| virtual | ~ModuleSQLOper () |
| virtual void | OnRehash (User *user, const std::string ¶meter) |
| Called on rehash. | |
| 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. | |
| bool | LookupOper (User *user, const std::string &username, const std::string &password) |
| virtual const char * | OnRequest (Request *request) |
| Called whenever a Request class is sent to your module by another module. | |
| void | LoginFail (User *user, const std::string &username, const std::string &pass) |
| bool | OperUser (User *user, const std::string &pattern, const std::string &type) |
| virtual Version | GetVersion () |
| Returns the version number of a Module. | |
Private Attributes | |
| Module * | SQLutils |
| std::string | databaseid |
| irc::string | hashtype |
| hashymodules | hashers |
| bool | diduseiface |
| std::deque< std::string > | names |
Definition at line 25 of file m_sqloper.cpp.
|
|
Definition at line 35 of file m_sqloper.cpp. References ModuleManager::Attach(), diduseiface, ModuleManager::Find(), ModuleManager::FindInterface(), hashers, I_OnLoadModule, I_OnPreCommand, I_OnRehash, I_OnRequest, InspIRCd::Modules, names, OnRehash(), Module::ServerInstance, SQLutils, and ModuleManager::UseInterface(). |
|
|
Definition at line 107 of file m_sqloper.cpp. References diduseiface, ModuleManager::DoneWithInterface(), InspIRCd::Modules, and Module::ServerInstance. |
|
|
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 327 of file m_sqloper.cpp. References API_VERSION, and VF_VENDOR. |
|
||||||||||||||||
|
Definition at line 283 of file m_sqloper.cpp. References DEBUG, CommandParser::GetHandler(), Command::Handle(), LogManager::Log(), InspIRCd::Logs, InspIRCd::Parser, and Module::ServerInstance. Referenced by OnRequest(). |
|
||||||||||||||||
|
Definition at line 141 of file m_sqloper.cpp. References databaseid, Extensible::Extend(), ModuleManager::FindFeature(), hashers, hashtype, SQLrequest::id, LogManager::Log(), InspIRCd::Logs, InspIRCd::Modules, Request::Send(), Module::ServerInstance, SPARSE, and SQLutils. Referenced by OnPreCommand(). |
|
||||||||||||||||
|
Definition at line 77 of file m_sqloper.cpp. References InspIRCd::Match(), and InspIRCd::MatchCIDR(). Referenced by OperUser(). |
|
||||||||||||
|
Called whenever a module is loaded. mod will contain a pointer to the module, and string will contain its name, for example m_widgets.so. This function is primary for dependency checking, your module may decide to enable some extra features if it sees that you have for example loaded "m_killwidgets.so" with "m_makewidgets.so". It is highly recommended that modules do *NOT* bail if they cannot satisfy dependencies, but instead operate under reduced functionality, unless the dependency is absolutely neccessary (e.g. a module that extends the features of another module).
Reimplemented from Module. Definition at line 91 of file m_sqloper.cpp. References DEBUG, diduseiface, hashers, LogManager::Log(), InspIRCd::Logs, ModuleManager::ModuleHasInterface(), InspIRCd::Modules, names, Module::ServerInstance, and ModuleManager::UseInterface(). |
|
||||||||||||||||||||||||
|
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 124 of file m_sqloper.cpp. References LookupOper(). |
|
||||||||||||
|
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 116 of file m_sqloper.cpp. References assign(), Conf, databaseid, hashtype, ConfigReader::ReadValue(), and Module::ServerInstance. Referenced by ModuleSQLOper(). |
|
|
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 192 of file m_sqloper.cpp. References SQLresult::error, Extensible::GetExt(), Request::GetId(), SQLresult::GetRowMap(), SQLerror::Id(), SQLresult::id, LoginFail(), OperUser(), SQLresult::Rows(), SQL_NO_ERROR, SQLRESID, SQLSUCCESS, and SQLutils. |
|
||||||||||||||||
|
Definition at line 300 of file m_sqloper.cpp. References User::ChangeDisplayedHost(), Conf, ConfigReader::Enumerate(), User::GetIPString(), User::host, User::ident, OneOfMatches(), User::Oper(), ConfigReader::ReadValue(), and Module::ServerInstance. Referenced by OnRequest(). |
|
|
Definition at line 28 of file m_sqloper.cpp. Referenced by LookupOper(), and OnRehash(). |
|
|
Definition at line 31 of file m_sqloper.cpp. Referenced by ModuleSQLOper(), OnLoadModule(), and ~ModuleSQLOper(). |
|
|
Definition at line 30 of file m_sqloper.cpp. Referenced by LookupOper(), ModuleSQLOper(), and OnLoadModule(). |
|
|
Definition at line 29 of file m_sqloper.cpp. Referenced by LookupOper(), and OnRehash(). |
|
|
Definition at line 32 of file m_sqloper.cpp. Referenced by ModuleSQLOper(), and OnLoadModule(). |
|
|
Definition at line 27 of file m_sqloper.cpp. Referenced by LookupOper(), ModuleSQLOper(), and OnRequest(). |