summaryrefslogtreecommitdiff
path: root/src/modules/extra/m_mssql.cpp
diff options
context:
space:
mode:
authorw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2008-09-21 12:56:03 +0000
committerw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2008-09-21 12:56:03 +0000
commitad3524174350633c25dc8a4e5ffbb7066c4b8cba (patch)
tree32b54faeca449b75ae9bc9f839c36ef448c9dd57 /src/modules/extra/m_mssql.cpp
parent1daa5273d70105f112d93a7528032826c9a66983 (diff)
Be consistent. Use ServerInstance in all places instead of 'Instance' in half. This has bugged me forever :p. I think I got all of extra/ too..
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10579 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules/extra/m_mssql.cpp')
-rw-r--r--src/modules/extra/m_mssql.cpp26
1 files changed, 13 insertions, 13 deletions
diff --git a/src/modules/extra/m_mssql.cpp b/src/modules/extra/m_mssql.cpp
index d52744fe4..5e7662588 100644
--- a/src/modules/extra/m_mssql.cpp
+++ b/src/modules/extra/m_mssql.cpp
@@ -46,10 +46,10 @@ class QueryThread : public Thread
{
private:
ModuleMsSQL* Parent;
- InspIRCd* Instance;
+ InspIRCd* ServerInstance;
public:
QueryThread(InspIRCd* si, ModuleMsSQL* mod)
- : Thread(), Parent(mod), Instance(si)
+ : Thread(), Parent(mod), ServerInstance(si)
{
}
~QueryThread() { }
@@ -68,7 +68,7 @@ class ResultNotifier : public BufferedSocket
virtual bool OnDataReady()
{
char data = 0;
- if (Instance->SE->Recv(this, &data, 1, 0) > 0)
+ if (ServerInstance->SE->Recv(this, &data, 1, 0) > 0)
{
Dispatch();
return true;
@@ -285,7 +285,7 @@ class SQLConn : public classbase
{
private:
ResultQueue results;
- InspIRCd* Instance;
+ InspIRCd* ServerInstance;
Module* mod;
SQLhost host;
TDSLOGIN* login;
@@ -296,7 +296,7 @@ class SQLConn : public classbase
QueryQueue queue;
SQLConn(InspIRCd* SI, Module* m, const SQLhost& hi)
- : Instance(SI), mod(m), host(hi), login(NULL), sock(NULL), context(NULL)
+ : ServerInstance(SI), mod(m), host(hi), login(NULL), sock(NULL), context(NULL)
{
if (OpenDB())
{
@@ -306,7 +306,7 @@ class SQLConn : public classbase
if (tds_process_simple_query(sock) != TDS_SUCCEED)
{
LoggingMutex->Lock();
- Instance->Logs->Log("m_mssql",DEFAULT, "WARNING: Could not select database " + host.name + " for DB with id: " + host.id);
+ ServerInstance->Logs->Log("m_mssql",DEFAULT, "WARNING: Could not select database " + host.name + " for DB with id: " + host.id);
LoggingMutex->Unlock();
CloseDB();
}
@@ -314,7 +314,7 @@ class SQLConn : public classbase
else
{
LoggingMutex->Lock();
- Instance->Logs->Log("m_mssql",DEFAULT, "WARNING: Could not select database " + host.name + " for DB with id: " + host.id);
+ ServerInstance->Logs->Log("m_mssql",DEFAULT, "WARNING: Could not select database " + host.name + " for DB with id: " + host.id);
LoggingMutex->Unlock();
CloseDB();
}
@@ -322,7 +322,7 @@ class SQLConn : public classbase
else
{
LoggingMutex->Lock();
- Instance->Logs->Log("m_mssql",DEFAULT, "WARNING: Could not connect to DB with id: " + host.id);
+ ServerInstance->Logs->Log("m_mssql",DEFAULT, "WARNING: Could not connect to DB with id: " + host.id);
LoggingMutex->Unlock();
CloseDB();
}
@@ -414,7 +414,7 @@ class SQLConn : public classbase
char* msquery = strdup(req.query.q.data());
LoggingMutex->Lock();
- Instance->Logs->Log("m_mssql",DEBUG,"doing Query: %s",msquery);
+ ServerInstance->Logs->Log("m_mssql",DEBUG,"doing Query: %s",msquery);
LoggingMutex->Unlock();
if (tds_submit_query(sock, msquery) != TDS_SUCCEED)
{
@@ -430,8 +430,8 @@ class SQLConn : public classbase
int tds_res;
while (tds_process_tokens(sock, &tds_res, NULL, TDS_TOKEN_RESULTS) == TDS_SUCCEED)
{
- //Instance->Logs->Log("m_mssql",DEBUG,"<******> result type: %d", tds_res);
- //Instance->Logs->Log("m_mssql",DEBUG,"AFFECTED ROWS: %d", sock->rows_affected);
+ //ServerInstance->Logs->Log("m_mssql",DEBUG,"<******> result type: %d", tds_res);
+ //ServerInstance->Logs->Log("m_mssql",DEBUG,"AFFECTED ROWS: %d", sock->rows_affected);
switch (tds_res)
{
case TDS_ROWFMT_RESULT:
@@ -494,7 +494,7 @@ class SQLConn : public classbase
{
SQLConn* sc = (SQLConn*)pContext->parent;
LoggingMutex->Lock();
- sc->Instance->Logs->Log("m_mssql", DEBUG, "Message for DB with id: %s -> %s", sc->host.id.c_str(), pMessage->message);
+ sc->ServerInstance->Logs->Log("m_mssql", DEBUG, "Message for DB with id: %s -> %s", sc->host.id.c_str(), pMessage->message);
LoggingMutex->Unlock();
return 0;
}
@@ -503,7 +503,7 @@ class SQLConn : public classbase
{
SQLConn* sc = (SQLConn*)pContext->parent;
LoggingMutex->Lock();
- sc->Instance->Logs->Log("m_mssql", DEFAULT, "Error for DB with id: %s -> %s", sc->host.id.c_str(), pMessage->message);
+ sc->ServerInstance->Logs->Log("m_mssql", DEFAULT, "Error for DB with id: %s -> %s", sc->host.id.c_str(), pMessage->message);
LoggingMutex->Unlock();
return 0;
}