diff options
author | XTZGZoReX <none@none> | 2009-03-19 21:13:52 +0100 |
---|---|---|
committer | XTZGZoReX <none@none> | 2009-03-19 21:13:52 +0100 |
commit | 9fe43fa9c0bd21f6c203072f19a77a570680ecab (patch) | |
tree | 5592cf3a9b39a04e7e81295408625713a6fdd2bd /src/mangosd/RASocket.cpp | |
parent | fd2f768dfd7c877880942477a7d1b1645f5bfab9 (diff) |
* Implementing database logging:
** LogTime and LogColors config options removed due to incompatibility.
** Old file logging still available.
** Totally redone the Log class.
** Config options added: EnableLogDB, DBLogLevel, LogDB.Char, LogDB.RA, LogDB.GM -- remember to update config file.
** SQL updates attached.
--HG--
branch : trunk
Diffstat (limited to 'src/mangosd/RASocket.cpp')
-rw-r--r-- | src/mangosd/RASocket.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/mangosd/RASocket.cpp b/src/mangosd/RASocket.cpp index a48928d5a23..370340859d3 100644 --- a/src/mangosd/RASocket.cpp +++ b/src/mangosd/RASocket.cpp @@ -69,7 +69,7 @@ RASocket::~RASocket() ///- Delete buffer and decrease active admins count delete [] buff; - sLog.outRALog("Connection was closed.\n"); + sLog.outRemote("Connection was closed.\n"); if(stage==OK) iUsers--; @@ -79,7 +79,7 @@ RASocket::~RASocket() void RASocket::OnAccept() { std::string ss=GetRemoteAddress(); - sLog.outRALog("Incoming connection from %s.\n",ss.c_str()); + sLog.outRemote("Incoming connection from %s.\n",ss.c_str()); ///- If there is already an active admin, drop the connection if(iUsers) dropclient @@ -97,7 +97,7 @@ void RASocket::OnRead() unsigned int sz=ibuf.GetLength(); if(iInputLength+sz>=RA_BUFF_SIZE) { - sLog.outRALog("Input buffer overflow, possible DOS attack.\n"); + sLog.outRemote("Input buffer overflow, possible DOS attack.\n"); SetCloseAndDelete(); return; } @@ -160,7 +160,7 @@ void RASocket::OnRead() if(!result) { Sendf("-No such user.\r\n"); - sLog.outRALog("User %s does not exist.\n",szLogin.c_str()); + sLog.outRemote("User %s does not exist.\n",szLogin.c_str()); if(bSecure)SetCloseAndDelete(); } else @@ -173,7 +173,7 @@ void RASocket::OnRead() if(fields[0].GetUInt32()<iMinLevel) { Sendf("-Not enough privileges.\r\n"); - sLog.outRALog("User %s has no privilege.\n",szLogin.c_str()); + sLog.outRemote("User %s has no privilege.\n",szLogin.c_str()); if(bSecure)SetCloseAndDelete(); } else { @@ -208,14 +208,14 @@ void RASocket::OnRead() ++iUsers; Sendf("+Logged in.\r\n"); - sLog.outRALog("User %s has logged in.\n",szLogin.c_str()); + sLog.outRemote("User %s has logged in.\n",szLogin.c_str()); Sendf("TC>"); } else { ///- Else deny access Sendf("-Wrong pass.\r\n"); - sLog.outRALog("User %s has failed to log in.\n",szLogin.c_str()); + sLog.outRemote("User %s has failed to log in.\n",szLogin.c_str()); if(bSecure)SetCloseAndDelete(); } } @@ -224,7 +224,7 @@ void RASocket::OnRead() case OK: if(strlen(buff)) { - sLog.outRALog("Got '%s' cmd.\n",buff); + sLog.outRemote("Got '%s' cmd.\n",buff); sWorld.QueueCliCommand(&RASocket::zprint , buff); } else |