mirror of
https://github.com/EQEmu/Server.git
synced 2026-01-06 13:33:52 +00:00
Replace all zlog calls
This commit is contained in:
parent
1069b13992
commit
551aadd27a
@ -77,7 +77,7 @@ bool ZoneServer::SetZone(uint32 iZoneID, uint32 iInstanceID, bool iStaticZone) {
|
||||
char* longname;
|
||||
|
||||
if (iZoneID)
|
||||
zlog(WORLD__ZONE,"Setting to '%s' (%d:%d)%s",(zn) ? zn : "",iZoneID, iInstanceID,
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::World_Server,"Setting to '%s' (%d:%d)%s",(zn) ? zn : "",iZoneID, iInstanceID,
|
||||
iStaticZone ? " (Static)" : "");
|
||||
|
||||
zoneID = iZoneID;
|
||||
@ -188,7 +188,7 @@ bool ZoneServer::Process() {
|
||||
else {
|
||||
struct in_addr in;
|
||||
in.s_addr = GetIP();
|
||||
zlog(WORLD__ZONE_ERR,"Zone authorization failed.");
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::World_Server,"Zone authorization failed.");
|
||||
auto pack = new ServerPacket(ServerOP_ZAAuthFailed);
|
||||
SendPacket(pack);
|
||||
delete pack;
|
||||
@ -199,7 +199,7 @@ bool ZoneServer::Process() {
|
||||
else {
|
||||
struct in_addr in;
|
||||
in.s_addr = GetIP();
|
||||
zlog(WORLD__ZONE_ERR,"Zone authorization failed.");
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::World_Server,"Zone authorization failed.");
|
||||
auto pack = new ServerPacket(ServerOP_ZAAuthFailed);
|
||||
SendPacket(pack);
|
||||
delete pack;
|
||||
@ -541,10 +541,10 @@ bool ZoneServer::Process() {
|
||||
|
||||
RezzPlayer_Struct* sRezz = (RezzPlayer_Struct*) pack->pBuffer;
|
||||
if (zoneserver_list.SendPacket(pack)){
|
||||
zlog(WORLD__ZONE,"Sent Rez packet for %s",sRezz->rez.your_name);
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::World_Server,"Sent Rez packet for %s",sRezz->rez.your_name);
|
||||
}
|
||||
else {
|
||||
zlog(WORLD__ZONE,"Could not send Rez packet for %s",sRezz->rez.your_name);
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::World_Server,"Could not send Rez packet for %s",sRezz->rez.your_name);
|
||||
}
|
||||
break;
|
||||
}
|
||||
@ -589,10 +589,10 @@ bool ZoneServer::Process() {
|
||||
ServerConnectInfo* sci = (ServerConnectInfo*) p.pBuffer;
|
||||
sci->port = clientport;
|
||||
SendPacket(&p);
|
||||
zlog(WORLD__ZONE,"Auto zone port configuration. Telling zone to use port %d",clientport);
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::World_Server,"Auto zone port configuration. Telling zone to use port %d",clientport);
|
||||
} else {
|
||||
clientport=sci->port;
|
||||
zlog(WORLD__ZONE,"Zone specified port %d, must be a previously allocated zone reconnecting.",clientport);
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::World_Server,"Zone specified port %d, must be a previously allocated zone reconnecting.",clientport);
|
||||
}
|
||||
|
||||
}
|
||||
@ -602,7 +602,7 @@ bool ZoneServer::Process() {
|
||||
const LaunchName_Struct* ln = (const LaunchName_Struct*)pack->pBuffer;
|
||||
launcher_name = ln->launcher_name;
|
||||
launched_name = ln->zone_name;
|
||||
zlog(WORLD__ZONE, "Zone started with name %s by launcher %s", launched_name.c_str(), launcher_name.c_str());
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::World_Server, "Zone started with name %s by launcher %s", launched_name.c_str(), launcher_name.c_str());
|
||||
break;
|
||||
}
|
||||
case ServerOP_ShutdownAll: {
|
||||
@ -685,12 +685,12 @@ bool ZoneServer::Process() {
|
||||
if(WorldConfig::get()->UpdateStats)
|
||||
client = client_list.FindCharacter(ztz->name);
|
||||
|
||||
zlog(WORLD__ZONE,"ZoneToZone request for %s current zone %d req zone %d\n",
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::World_Server,"ZoneToZone request for %s current zone %d req zone %d\n",
|
||||
ztz->name, ztz->current_zone_id, ztz->requested_zone_id);
|
||||
|
||||
/* This is a request from the egress zone */
|
||||
if(GetZoneID() == ztz->current_zone_id && GetInstanceID() == ztz->current_instance_id) {
|
||||
zlog(WORLD__ZONE,"Processing ZTZ for egress from zone for client %s\n", ztz->name);
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::World_Server,"Processing ZTZ for egress from zone for client %s\n", ztz->name);
|
||||
|
||||
if (ztz->admin < 80 && ztz->ignorerestrictions < 2 && zoneserver_list.IsZoneLocked(ztz->requested_zone_id)) {
|
||||
ztz->response = 0;
|
||||
@ -736,7 +736,7 @@ bool ZoneServer::Process() {
|
||||
/* Response from Ingress server, route back to egress */
|
||||
else{
|
||||
|
||||
zlog(WORLD__ZONE,"Processing ZTZ for ingress to zone for client %s\n", ztz->name);
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::World_Server,"Processing ZTZ for ingress to zone for client %s\n", ztz->name);
|
||||
ZoneServer *egress_server = nullptr;
|
||||
if(ztz->current_instance_id > 0) {
|
||||
egress_server = zoneserver_list.FindByInstanceID(ztz->current_instance_id);
|
||||
@ -754,7 +754,7 @@ bool ZoneServer::Process() {
|
||||
}
|
||||
case ServerOP_ClientList: {
|
||||
if (pack->size != sizeof(ServerClientList_Struct)) {
|
||||
zlog(WORLD__ZONE_ERR,"Wrong size on ServerOP_ClientList. Got: %d, Expected: %d",pack->size,sizeof(ServerClientList_Struct));
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::World_Server,"Wrong size on ServerOP_ClientList. Got: %d, Expected: %d",pack->size,sizeof(ServerClientList_Struct));
|
||||
break;
|
||||
}
|
||||
client_list.ClientUpdate(this, (ServerClientList_Struct*) pack->pBuffer);
|
||||
@ -763,7 +763,7 @@ bool ZoneServer::Process() {
|
||||
case ServerOP_ClientListKA: {
|
||||
ServerClientListKeepAlive_Struct* sclka = (ServerClientListKeepAlive_Struct*) pack->pBuffer;
|
||||
if (pack->size < 4 || pack->size != 4 + (4 * sclka->numupdates)) {
|
||||
zlog(WORLD__ZONE_ERR,"Wrong size on ServerOP_ClientListKA. Got: %d, Expected: %d",pack->size, (4 + (4 * sclka->numupdates)));
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::World_Server,"Wrong size on ServerOP_ClientListKA. Got: %d, Expected: %d",pack->size, (4 + (4 * sclka->numupdates)));
|
||||
break;
|
||||
}
|
||||
client_list.CLEKeepAlive(sclka->numupdates, sclka->wid);
|
||||
@ -869,7 +869,7 @@ bool ZoneServer::Process() {
|
||||
}
|
||||
case ServerOP_GMGoto: {
|
||||
if (pack->size != sizeof(ServerGMGoto_Struct)) {
|
||||
zlog(WORLD__ZONE_ERR,"Wrong size on ServerOP_GMGoto. Got: %d, Expected: %d",pack->size,sizeof(ServerGMGoto_Struct));
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::World_Server,"Wrong size on ServerOP_GMGoto. Got: %d, Expected: %d",pack->size,sizeof(ServerGMGoto_Struct));
|
||||
break;
|
||||
}
|
||||
ServerGMGoto_Struct* gmg = (ServerGMGoto_Struct*) pack->pBuffer;
|
||||
@ -889,7 +889,7 @@ bool ZoneServer::Process() {
|
||||
}
|
||||
case ServerOP_Lock: {
|
||||
if (pack->size != sizeof(ServerLock_Struct)) {
|
||||
zlog(WORLD__ZONE_ERR,"Wrong size on ServerOP_Lock. Got: %d, Expected: %d",pack->size,sizeof(ServerLock_Struct));
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::World_Server,"Wrong size on ServerOP_Lock. Got: %d, Expected: %d",pack->size,sizeof(ServerLock_Struct));
|
||||
break;
|
||||
}
|
||||
ServerLock_Struct* slock = (ServerLock_Struct*) pack->pBuffer;
|
||||
@ -914,7 +914,7 @@ bool ZoneServer::Process() {
|
||||
}
|
||||
case ServerOP_Motd: {
|
||||
if (pack->size != sizeof(ServerMotd_Struct)) {
|
||||
zlog(WORLD__ZONE_ERR,"Wrong size on ServerOP_Motd. Got: %d, Expected: %d",pack->size,sizeof(ServerMotd_Struct));
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::World_Server,"Wrong size on ServerOP_Motd. Got: %d, Expected: %d",pack->size,sizeof(ServerMotd_Struct));
|
||||
break;
|
||||
}
|
||||
ServerMotd_Struct* smotd = (ServerMotd_Struct*) pack->pBuffer;
|
||||
@ -925,7 +925,7 @@ bool ZoneServer::Process() {
|
||||
}
|
||||
case ServerOP_Uptime: {
|
||||
if (pack->size != sizeof(ServerUptime_Struct)) {
|
||||
zlog(WORLD__ZONE_ERR,"Wrong size on ServerOP_Uptime. Got: %d, Expected: %d",pack->size,sizeof(ServerUptime_Struct));
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::World_Server,"Wrong size on ServerOP_Uptime. Got: %d, Expected: %d",pack->size,sizeof(ServerUptime_Struct));
|
||||
break;
|
||||
}
|
||||
ServerUptime_Struct* sus = (ServerUptime_Struct*) pack->pBuffer;
|
||||
@ -944,7 +944,7 @@ bool ZoneServer::Process() {
|
||||
break;
|
||||
}
|
||||
case ServerOP_GetWorldTime: {
|
||||
zlog(WORLD__ZONE,"Broadcasting a world time update");
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::World_Server,"Broadcasting a world time update");
|
||||
auto pack = new ServerPacket;
|
||||
|
||||
pack->opcode = ServerOP_SyncWorldTime;
|
||||
@ -959,17 +959,17 @@ bool ZoneServer::Process() {
|
||||
break;
|
||||
}
|
||||
case ServerOP_SetWorldTime: {
|
||||
zlog(WORLD__ZONE,"Received SetWorldTime");
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::World_Server,"Received SetWorldTime");
|
||||
eqTimeOfDay* newtime = (eqTimeOfDay*) pack->pBuffer;
|
||||
zoneserver_list.worldclock.setEQTimeOfDay(newtime->start_eqtime, newtime->start_realtime);
|
||||
zlog(WORLD__ZONE,"New time = %d-%d-%d %d:%d (%d)\n", newtime->start_eqtime.year, newtime->start_eqtime.month, (int)newtime->start_eqtime.day, (int)newtime->start_eqtime.hour, (int)newtime->start_eqtime.minute, (int)newtime->start_realtime);
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::World_Server,"New time = %d-%d-%d %d:%d (%d)\n", newtime->start_eqtime.year, newtime->start_eqtime.month, (int)newtime->start_eqtime.day, (int)newtime->start_eqtime.hour, (int)newtime->start_eqtime.minute, (int)newtime->start_realtime);
|
||||
zoneserver_list.worldclock.saveFile(WorldConfig::get()->EQTimeFile.c_str());
|
||||
zoneserver_list.SendTimeSync();
|
||||
break;
|
||||
}
|
||||
case ServerOP_IPLookup: {
|
||||
if (pack->size < sizeof(ServerGenericWorldQuery_Struct)) {
|
||||
zlog(WORLD__ZONE_ERR,"Wrong size on ServerOP_IPLookup. Got: %d, Expected (at least): %d",pack->size,sizeof(ServerGenericWorldQuery_Struct));
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::World_Server,"Wrong size on ServerOP_IPLookup. Got: %d, Expected (at least): %d",pack->size,sizeof(ServerGenericWorldQuery_Struct));
|
||||
break;
|
||||
}
|
||||
ServerGenericWorldQuery_Struct* sgwq = (ServerGenericWorldQuery_Struct*) pack->pBuffer;
|
||||
@ -981,7 +981,7 @@ bool ZoneServer::Process() {
|
||||
}
|
||||
case ServerOP_LockZone: {
|
||||
if (pack->size < sizeof(ServerLockZone_Struct)) {
|
||||
zlog(WORLD__ZONE_ERR,"Wrong size on ServerOP_LockZone. Got: %d, Expected: %d",pack->size,sizeof(ServerLockZone_Struct));
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::World_Server,"Wrong size on ServerOP_LockZone. Got: %d, Expected: %d",pack->size,sizeof(ServerLockZone_Struct));
|
||||
break;
|
||||
}
|
||||
ServerLockZone_Struct* s = (ServerLockZone_Struct*) pack->pBuffer;
|
||||
@ -1026,10 +1026,10 @@ bool ZoneServer::Process() {
|
||||
ZoneServer* zs = zoneserver_list.FindByZoneID(s->zone_id);
|
||||
if(zs) {
|
||||
if (zs->SendPacket(pack)) {
|
||||
zlog(WORLD__ZONE,"Sent request to spawn player corpse id %i in zone %u.",s->player_corpse_id, s->zone_id);
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::World_Server,"Sent request to spawn player corpse id %i in zone %u.",s->player_corpse_id, s->zone_id);
|
||||
}
|
||||
else {
|
||||
zlog(WORLD__ZONE_ERR,"Could not send request to spawn player corpse id %i in zone %u.",s->player_corpse_id, s->zone_id);
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::World_Server,"Could not send request to spawn player corpse id %i in zone %u.",s->player_corpse_id, s->zone_id);
|
||||
}
|
||||
}
|
||||
break;
|
||||
@ -1048,10 +1048,10 @@ bool ZoneServer::Process() {
|
||||
zs = zoneserver_list.FindByInstanceID(cle->instance());
|
||||
if(zs) {
|
||||
if(zs->SendPacket(pack)) {
|
||||
zlog(WORLD__ZONE, "Sent consent packet from player %s to player %s in zone %u.", s->ownername, s->grantname, cle->instance());
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::World_Server, "Sent consent packet from player %s to player %s in zone %u.", s->ownername, s->grantname, cle->instance());
|
||||
}
|
||||
else {
|
||||
zlog(WORLD__ZONE_ERR, "Unable to locate zone record for instance id %u in zoneserver list for ServerOP_Consent operation.", s->instance_id);
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::World_Server, "Unable to locate zone record for instance id %u in zoneserver list for ServerOP_Consent operation.", s->instance_id);
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -1068,10 +1068,10 @@ bool ZoneServer::Process() {
|
||||
zs = zoneserver_list.FindByInstanceID(s->instance_id);
|
||||
if(zs) {
|
||||
if(!zs->SendPacket(pack))
|
||||
zlog(WORLD__ZONE_ERR, "Unable to send consent response back to player %s in instance %u.", s->ownername, zs->GetInstanceID());
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::World_Server, "Unable to send consent response back to player %s in instance %u.", s->ownername, zs->GetInstanceID());
|
||||
}
|
||||
else {
|
||||
zlog(WORLD__ZONE_ERR, "Unable to locate zone record for instance id %u in zoneserver list for ServerOP_Consent_Response operation.", s->instance_id);
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::World_Server, "Unable to locate zone record for instance id %u in zoneserver list for ServerOP_Consent_Response operation.", s->instance_id);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1080,10 +1080,10 @@ bool ZoneServer::Process() {
|
||||
zs = zoneserver_list.FindByZoneID(cle->zone());
|
||||
if(zs) {
|
||||
if(zs->SendPacket(pack)) {
|
||||
zlog(WORLD__ZONE, "Sent consent packet from player %s to player %s in zone %u.", s->ownername, s->grantname, cle->zone());
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::World_Server, "Sent consent packet from player %s to player %s in zone %u.", s->ownername, s->grantname, cle->zone());
|
||||
}
|
||||
else {
|
||||
zlog(WORLD__ZONE_ERR, "Unable to locate zone record for zone id %u in zoneserver list for ServerOP_Consent operation.", s->zone_id);
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::World_Server, "Unable to locate zone record for zone id %u in zoneserver list for ServerOP_Consent operation.", s->zone_id);
|
||||
}
|
||||
}
|
||||
else {
|
||||
@ -1099,10 +1099,10 @@ bool ZoneServer::Process() {
|
||||
zs = zoneserver_list.FindByZoneID(s->zone_id);
|
||||
if(zs) {
|
||||
if(!zs->SendPacket(pack))
|
||||
zlog(WORLD__ZONE_ERR, "Unable to send consent response back to player %s in zone %s.", s->ownername, zs->GetZoneName());
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::World_Server, "Unable to send consent response back to player %s in zone %s.", s->ownername, zs->GetZoneName());
|
||||
}
|
||||
else {
|
||||
zlog(WORLD__ZONE_ERR, "Unable to locate zone record for zone id %u in zoneserver list for ServerOP_Consent_Response operation.", s->zone_id);
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::World_Server, "Unable to locate zone record for zone id %u in zoneserver list for ServerOP_Consent_Response operation.", s->zone_id);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1120,10 +1120,10 @@ bool ZoneServer::Process() {
|
||||
zs = zoneserver_list.FindByZoneID(s->zone_id);
|
||||
if(zs) {
|
||||
if(!zs->SendPacket(pack))
|
||||
zlog(WORLD__ZONE_ERR, "Unable to send consent response back to player %s in zone %s.", s->ownername, zs->GetZoneName());
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::World_Server, "Unable to send consent response back to player %s in zone %s.", s->ownername, zs->GetZoneName());
|
||||
}
|
||||
else {
|
||||
zlog(WORLD__ZONE_ERR, "Unable to locate zone record for zone id %u in zoneserver list for ServerOP_Consent_Response operation.", s->zone_id);
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::World_Server, "Unable to locate zone record for zone id %u in zoneserver list for ServerOP_Consent_Response operation.", s->zone_id);
|
||||
}
|
||||
}
|
||||
break;
|
||||
@ -1139,10 +1139,10 @@ bool ZoneServer::Process() {
|
||||
ZoneServer* zs = zoneserver_list.FindByInstanceID(s->instance_id);
|
||||
if(zs) {
|
||||
if(!zs->SendPacket(pack))
|
||||
zlog(WORLD__ZONE_ERR, "Unable to send consent response back to player %s in instance %u.", s->ownername, zs->GetInstanceID());
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::World_Server, "Unable to send consent response back to player %s in instance %u.", s->ownername, zs->GetInstanceID());
|
||||
}
|
||||
else {
|
||||
zlog(WORLD__ZONE_ERR, "Unable to locate zone record for instance id %u in zoneserver list for ServerOP_Consent_Response operation.", s->instance_id);
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::World_Server, "Unable to locate zone record for instance id %u in zoneserver list for ServerOP_Consent_Response operation.", s->instance_id);
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -1150,10 +1150,10 @@ bool ZoneServer::Process() {
|
||||
ZoneServer* zs = zoneserver_list.FindByZoneID(s->zone_id);
|
||||
if(zs) {
|
||||
if(!zs->SendPacket(pack))
|
||||
zlog(WORLD__ZONE_ERR, "Unable to send consent response back to player %s in zone %s.", s->ownername, zs->GetZoneName());
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::World_Server, "Unable to send consent response back to player %s in zone %s.", s->ownername, zs->GetZoneName());
|
||||
}
|
||||
else {
|
||||
zlog(WORLD__ZONE_ERR, "Unable to locate zone record for zone id %u in zoneserver list for ServerOP_Consent_Response operation.", s->zone_id);
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::World_Server, "Unable to locate zone record for zone id %u in zoneserver list for ServerOP_Consent_Response operation.", s->zone_id);
|
||||
}
|
||||
}
|
||||
break;
|
||||
@ -1255,7 +1255,7 @@ bool ZoneServer::Process() {
|
||||
|
||||
case ServerOP_LSAccountUpdate:
|
||||
{
|
||||
zlog(WORLD__ZONE, "Received ServerOP_LSAccountUpdate packet from zone");
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::World_Server, "Received ServerOP_LSAccountUpdate packet from zone");
|
||||
loginserverlist.SendAccountUpdate(pack);
|
||||
break;
|
||||
}
|
||||
@ -1310,7 +1310,7 @@ bool ZoneServer::Process() {
|
||||
}
|
||||
default:
|
||||
{
|
||||
zlog(WORLD__ZONE_ERR,"Unknown ServerOPcode from zone 0x%04x, size %d",pack->opcode,pack->size);
|
||||
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::World_Server,"Unknown ServerOPcode from zone 0x%04x, size %d",pack->opcode,pack->size);
|
||||
DumpPacket(pack->pBuffer, pack->size);
|
||||
break;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user