|
|||
|
|||
|


Public Member Functions | |
| ModulePgSQL (InspIRCd *Me) | |
| virtual | ~ModulePgSQL () |
| virtual void | OnRehash (User *user, const std::string ¶meter) |
| Called on rehash. | |
| bool | HasHost (const SQLhost &host) |
| bool | HostInConf (const SQLhost &h) |
| void | ReadConf () |
| void | ClearOldConnections () |
| void | ClearAllConnections () |
| void | AddConn (const SQLhost &hi) |
| void | ReconnectConn (SQLConn *conn) |
| virtual const char * | OnRequest (Request *request) |
| Called whenever a Request class is sent to your module by another module. | |
| virtual void | OnUnloadModule (Module *mod, const std::string &name) |
| Called whenever a module is unloaded. | |
| unsigned long | NewID () |
| virtual Version | GetVersion () |
| Returns the version number of a Module. | |
Private Attributes | |
| ConnMap | connections |
| unsigned long | currid |
| char * | sqlsuccess |
| ReconnectTimer * | retimer |
Definition at line 710 of file m_pgsql.cpp.
|
|
Definition at line 719 of file m_pgsql.cpp. References ModuleManager::Attach(), I_OnCheckReady, I_OnRehash, I_OnRequest, I_OnUnloadModule, I_OnUserDisconnect, I_OnUserRegister, InspIRCd::Modules, ModuleManager::PublishFeature(), ModuleManager::PublishInterface(), ReadConf(), Module::ServerInstance, SQLSUCCESS, sqlsuccess, strlcpy(), and ModuleManager::UseInterface(). |
|
|
Definition at line 740 of file m_pgsql.cpp. References ClearAllConnections(), TimerManager::DelTimer(), ModuleManager::DoneWithInterface(), InspIRCd::Modules, retimer, Module::ServerInstance, sqlsuccess, InspIRCd::Timers, ModuleManager::UnpublishFeature(), and ModuleManager::UnpublishInterface(). |
|
|
Definition at line 875 of file m_pgsql.cpp. References connections, DEFAULT, HasHost(), SQLhost::id, LogManager::Log(), InspIRCd::Logs, and Module::ServerInstance. Referenced by ReadConf(). |
|
|
Definition at line 865 of file m_pgsql.cpp. References connections. Referenced by ~ModulePgSQL(). |
|
|
Definition at line 850 of file m_pgsql.cpp. References connections, and HostInConf(). Referenced by ReadConf(). |
|
|
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 951 of file m_pgsql.cpp. References API_VERSION, VF_SERVICEPROVIDER, and VF_VENDOR. |
|
|
Definition at line 757 of file m_pgsql.cpp. References connections. Referenced by AddConn(), and ReadConf(). |
|
|
Definition at line 767 of file m_pgsql.cpp. References conf, ConfigReader::Enumerate(), SQLhost::host, SQLhost::id, SQLhost::name, SQLhost::pass, SQLhost::port, ConfigReader::ReadFlag(), ConfigReader::ReadInteger(), ConfigReader::ReadValue(), Module::ServerInstance, SQLhost::ssl, and SQLhost::user. Referenced by ClearOldConnections(). |
|
|
Definition at line 943 of file m_pgsql.cpp. References currid. Referenced by OnRequest(). |
|
||||||||||||
|
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 752 of file m_pgsql.cpp. References ReadConf(). |
|
|
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 906 of file m_pgsql.cpp. References connections, SQLrequest::dbid, SQLrequest::error, Request::GetId(), SQLerror::Id(), SQLrequest::id, NewID(), SQL_BAD_DBID, SQL_NO_ERROR, SQLREQID, and sqlsuccess. |
|
||||||||||||
|
Called whenever a module is unloaded. 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 929 of file m_pgsql.cpp. References connections. |
|
|
Definition at line 786 of file m_pgsql.cpp. References AddConn(), InspIRCd::AddResolver(), ClearOldConnections(), conf, DEBUG, ConfigReader::Enumerate(), HasHost(), SQLhost::host, SQLhost::id, SQLhost::ip, LogManager::Log(), InspIRCd::Logs, SQLhost::name, SQLhost::pass, SQLhost::port, ConfigReader::ReadFlag(), ConfigReader::ReadInteger(), ConfigReader::ReadValue(), Module::ServerInstance, SQLhost::ssl, and SQLhost::user. Referenced by ModulePgSQL(), and OnRehash(). |
|
|
Definition at line 891 of file m_pgsql.cpp. References TimerManager::AddTimer(), connections, retimer, Module::ServerInstance, and InspIRCd::Timers. |
|
|
Definition at line 713 of file m_pgsql.cpp. Referenced by AddConn(), ClearAllConnections(), ClearOldConnections(), HasHost(), OnRequest(), OnUnloadModule(), and ReconnectConn(). |
|
|
Definition at line 714 of file m_pgsql.cpp. Referenced by NewID(). |
|
|
Definition at line 716 of file m_pgsql.cpp. Referenced by ReconnectConn(), and ~ModulePgSQL(). |
|
|
Definition at line 715 of file m_pgsql.cpp. Referenced by ModulePgSQL(), OnRequest(), and ~ModulePgSQL(). |