|
|||
|
|||
|


Public Member Functions | |
| ModuleSQLLog (InspIRCd *Me) | |
| virtual | ~ModuleSQLLog () |
| void | ReadConfig () |
| virtual void | OnRehash (User *user, const std::string ¶meter) |
| Called on rehash. | |
| virtual const char * | OnRequest (Request *request) |
| Called whenever a Request class is sent to your module by another module. | |
| void | AddLogEntry (int category, const std::string &nick, const std::string &host, const std::string &source) |
| virtual void | OnOper (User *user, const std::string &opertype) |
| Called whenever a user opers locally. | |
| virtual void | OnGlobalOper (User *user) |
| Called whenever a user is given usermode +o, anywhere on the network. | |
| virtual int | OnKill (User *source, User *dest, const std::string &reason) |
| Called when a client is disconnected by KILL. | |
| 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 void | OnUserConnect (User *user) |
| Called when a user connects. | |
| virtual void | OnUserQuit (User *user, const std::string &reason, const std::string &oper_message) |
| Called when a user quits. | |
| virtual void | OnLoadModule (Module *mod, const std::string &name) |
| Called whenever a module is loaded. | |
| virtual Version | GetVersion () |
| Returns the version number of a Module. | |
Definition at line 182 of file m_sqllog.cpp.
|
|
Definition at line 186 of file m_sqllog.cpp. References active_queries, ModuleManager::Attach(), ModuleManager::Find(), ModuleManager::FindFeature(), I_OnGlobalOper, I_OnKill, I_OnLoadModule, I_OnOper, I_OnPreCommand, I_OnRehash, I_OnRequest, I_OnUserConnect, I_OnUserQuit, InspIRCd::Modules, OnRehash(), Module::ServerInstance, and ModuleManager::UseInterface(). |
|
|
Definition at line 207 of file m_sqllog.cpp. References ModuleManager::DoneWithInterface(), InspIRCd::Modules, and Module::ServerInstance. |
|
||||||||||||||||||||
|
Definition at line 247 of file m_sqllog.cpp. References active_queries, dbid, FIND_SOURCE, SQLrequest::id, QueryInfo::qs, Request::Send(), and Module::ServerInstance. Referenced by OnGlobalOper(), OnKill(), OnLoadModule(), OnOper(), OnPreCommand(), OnUserConnect(), and OnUserQuit(). |
|
|
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 302 of file m_sqllog.cpp. References API_VERSION, and VF_VENDOR. |
|
|
Called whenever a user is given usermode +o, anywhere on the network. You cannot override this and prevent it from happening as it is already happened and such a task must be performed by another server. You can however bounce modes by sending servermodes out to reverse mode changes.
Reimplemented from Module. Definition at line 267 of file m_sqllog.cpp. References AddLogEntry(), User::host, LT_OPER, User::nick, and User::server. |
|
||||||||||||||||
|
Called when a client is disconnected by KILL. If a client is killed by a server, e.g. a nickname collision or protocol error, source is NULL. Return 1 from this function to prevent the kill, and 0 from this function to allow it as normal. If you prevent the kill no output will be sent to the client, it is down to your module to generate this information. NOTE: It is NOT advisable to stop kills which originate from servers or remote users. If you do so youre risking race conditions, desyncs and worse!
Reimplemented from Module. Definition at line 272 of file m_sqllog.cpp. References AddLogEntry(), User::host, LT_KILL, and User::nick. |
|
||||||||||||
|
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 297 of file m_sqllog.cpp. References AddLogEntry(), InspIRCd::Config, LT_LOADMODULE, Module::ServerInstance, and ServerConfig::ServerName. |
|
||||||||||||
|
Called whenever a user opers locally. The User will contain the oper mode 'o' as this function is called after any modifications are made to the user's structure by the core.
Reimplemented from Module. Definition at line 262 of file m_sqllog.cpp. References AddLogEntry(), User::host, LT_OPER, User::nick, and User::server. |
|
||||||||||||||||||||||||
|
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 278 of file m_sqllog.cpp. References AddLogEntry(), LT_XLINE, User::nick, and User::server. |
|
||||||||||||
|
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 220 of file m_sqllog.cpp. References ReadConfig(). Referenced by ModuleSQLLog(). |
|
|
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 225 of file m_sqllog.cpp. References active_queries, Request::GetId(), SQLresult::id, SQLRESID, and SQLSUCCESS. |
|
|
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 287 of file m_sqllog.cpp. References AddLogEntry(), User::host, LT_CONNECT, User::nick, and User::server. |
|
||||||||||||||||
|
Called when a user quits. The details of the exiting user are available to you in the parameter User *user This event is only called when the user is fully registered when they quit. To catch raw disconnections, use the OnUserDisconnect method.
Reimplemented from Module. Definition at line 292 of file m_sqllog.cpp. References AddLogEntry(), User::host, LT_DISCONNECT, User::nick, and User::server. |
|
|
Definition at line 214 of file m_sqllog.cpp. References Conf, dbid, ConfigReader::ReadValue(), and Module::ServerInstance. Referenced by OnRehash(). |