Convert 'UCS' debugging _log to logger.LogDebugType

This commit is contained in:
Akkadius
2015-01-12 22:44:47 -06:00
parent f26f49c2a1
commit 40d32fc1e5
8 changed files with 126 additions and 120 deletions
+7 -6
View File
@@ -1,4 +1,5 @@
#include "../common/debug.h"
#include "../common/eqemu_logsys.h"
#include "ucs.h"
#include "world_config.h"
#include "../common/logsys.h"
@@ -17,7 +18,7 @@ void UCSConnection::SetConnection(EmuTCPConnection *inStream)
{
if(Stream)
{
_log(UCS__ERROR, "Incoming UCS Connection while we were already connected to a UCS.");
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::UCS_Server, "Incoming UCS Connection while we were already connected to a UCS.");
Stream->Disconnect();
}
@@ -51,7 +52,7 @@ bool UCSConnection::Process()
{
struct in_addr in;
in.s_addr = GetIP();
_log(UCS__ERROR, "UCS authorization failed.");
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::UCS_Server, "UCS authorization failed.");
auto pack = new ServerPacket(ServerOP_ZAAuthFailed);
SendPacket(pack);
delete pack;
@@ -63,7 +64,7 @@ bool UCSConnection::Process()
{
struct in_addr in;
in.s_addr = GetIP();
_log(UCS__ERROR, "UCS authorization failed.");
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::UCS_Server, "UCS authorization failed.");
auto pack = new ServerPacket(ServerOP_ZAAuthFailed);
SendPacket(pack);
delete pack;
@@ -73,7 +74,7 @@ bool UCSConnection::Process()
}
else
{
_log(UCS__ERROR,"**WARNING** You have not configured a world shared key in your config file. You should add a <key>STRING</key> element to your <world> element to prevent unauthroized zone access.");
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::UCS_Server,"**WARNING** You have not configured a world shared key in your config file. You should add a <key>STRING</key> element to your <world> element to prevent unauthroized zone access.");
authenticated = true;
}
delete pack;
@@ -91,12 +92,12 @@ bool UCSConnection::Process()
}
case ServerOP_ZAAuth:
{
_log(UCS__ERROR, "Got authentication from UCS when they are already authenticated.");
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::UCS_Server, "Got authentication from UCS when they are already authenticated.");
break;
}
default:
{
_log(UCS__ERROR, "Unknown ServerOPcode from UCS 0x%04x, size %d", pack->opcode, pack->size);
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::UCS_Server, "Unknown ServerOPcode from UCS 0x%04x, size %d", pack->opcode, pack->size);
DumpPacket(pack->pBuffer, pack->size);
break;
}