diff options
| author | 2009-09-26 14:13:13 +0000 | |
|---|---|---|
| committer | 2009-09-26 14:13:13 +0000 | |
| commit | 6d03943426dcce76ba66567a9b18425a5ebb4c0c (patch) | |
| tree | bedffa6d2a65a9ef556405224a6d7a181c8a1ba5 /src/modules/extra/m_pgsql.cpp | |
| parent | Add FD_WANT_SINGLE_WRITE to efficiently replace FD_WANT_POLL_WRITE (diff) | |
Remove InspIRCd* parameters and fields
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11763 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules/extra/m_pgsql.cpp')
| -rw-r--r-- | src/modules/extra/m_pgsql.cpp | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/src/modules/extra/m_pgsql.cpp b/src/modules/extra/m_pgsql.cpp index c61e0983c..c0d301107 100644 --- a/src/modules/extra/m_pgsql.cpp +++ b/src/modules/extra/m_pgsql.cpp @@ -93,7 +93,7 @@ class ReconnectTimer : public Timer private: Module* mod; public: - ReconnectTimer(InspIRCd* SI, Module* m) + ReconnectTimer(Module* m) : Timer(5, SI->Time(), false), mod(m) { } @@ -301,7 +301,6 @@ public: class SQLConn : public EventHandler { private: - InspIRCd* ServerInstance; SQLhost confhost; /* The <database> entry */ Module* us; /* Pointer to the SQL provider itself */ PGconn* sql; /* PgSQL database connection handle */ @@ -311,8 +310,8 @@ class SQLConn : public EventHandler time_t idle; /* Time we last heard from the database */ public: - SQLConn(InspIRCd* SI, Module* self, const SQLhost& hi) - : EventHandler(), ServerInstance(SI), confhost(hi), us(self), sql(NULL), status(CWRITE), qinprog(false) + SQLConn(Module* self, const SQLhost& hi) + : EventHandler(), confhost(hi), us(self), sql(NULL), status(CWRITE), qinprog(false) { idle = this->ServerInstance->Time(); if(!DoConnect()) @@ -763,8 +762,8 @@ class ModulePgSQL : public Module ReconnectTimer* retimer; public: - ModulePgSQL(InspIRCd* Me) - : Module(Me), currid(0) + ModulePgSQL() + : currid(0) { ServerInstance->Modules->UseInterface("SQLutils"); @@ -813,7 +812,7 @@ class ModulePgSQL : public Module bool HostInConf(const SQLhost &h) { - ConfigReader conf(ServerInstance); + ConfigReader conf; for(int i = 0; i < conf.Enumerate("database"); i++) { SQLhost host; @@ -834,7 +833,7 @@ class ModulePgSQL : public Module { ClearOldConnections(); - ConfigReader conf(ServerInstance); + ConfigReader conf; for(int i = 0; i < conf.Enumerate("database"); i++) { SQLhost host; @@ -889,7 +888,7 @@ class ModulePgSQL : public Module SQLConn* newconn; - newconn = new SQLConn(ServerInstance, this, hi); + newconn = new SQLConn(this, hi); connections.insert(std::make_pair(hi.id, newconn)); } @@ -905,7 +904,7 @@ class ModulePgSQL : public Module break; } } - retimer = new ReconnectTimer(ServerInstance, this); + retimer = new ReconnectTimer(this); ServerInstance->Timers->AddTimer(retimer); } |
