Add logout-notice in charlog on player logout

--HG--
branch : trunk
This commit is contained in:
click
2010-05-15 01:26:28 +02:00
parent 85ec98ff9f
commit a0105b5bde
2 changed files with 7 additions and 5 deletions

View File

@@ -476,8 +476,9 @@ void WorldSession::HandleCharCreateOpcode(WorldPacket & recv_data)
SendPacket(&data);
std::string IP_str = GetRemoteAddress();
sLog.outDetail("Account: %d (IP: %s) Create Character:[%s]",GetAccountId(),IP_str.c_str(),name.c_str());
sLog.outChar("Account: %d (IP: %s) Create Character:[%s]",GetAccountId(),IP_str.c_str(),name.c_str());
sLog.outBasic("Account: %d (IP: %s) Create Character:[%s] (GUID: %u)", GetAccountId(), IP_str.c_str(), name.c_str(), pNewChar->GetGUIDLow());
sLog.outChar("Account: %d (IP: %s) Create Character:[%s] (GUID: %u)", GetAccountId(), IP_str.c_str(), name.c_str(), pNewChar->GetGUIDLow());
}
void WorldSession::HandleCharDeleteOpcode(WorldPacket & recv_data)
@@ -523,8 +524,8 @@ void WorldSession::HandleCharDeleteOpcode(WorldPacket & recv_data)
return;
std::string IP_str = GetRemoteAddress();
sLog.outDetail("Account: %d (IP: %s) Delete Character:[%s] (guid: %u)",GetAccountId(),IP_str.c_str(),name.c_str(),GUID_LOPART(guid));
sLog.outChar("Account: %d (IP: %s) Delete Character:[%s] (guid: %u)",GetAccountId(),IP_str.c_str(),name.c_str(),GUID_LOPART(guid));
sLog.outDetail("Account: %d (IP: %s) Delete Character:[%s] (GUID: %u)",GetAccountId(),IP_str.c_str(),name.c_str(),GUID_LOPART(guid));
sLog.outChar("Account: %d (IP: %s) Delete Character:[%s] (GUID: %u)",GetAccountId(),IP_str.c_str(),name.c_str(),GUID_LOPART(guid));
if (sLog.IsOutCharDump()) // optimize GetPlayerDump call
{
@@ -794,7 +795,7 @@ void WorldSession::HandlePlayerLogin(LoginQueryHolder * holder)
SendNotification(LANG_GM_ON);
std::string IP_str = GetRemoteAddress();
sLog.outChar("Account: %d (IP: %s) Login Character:[%s] (guid:%u)",
sLog.outChar("Account: %d (IP: %s) Login Character:[%s] (GUID: %u)",
GetAccountId(),IP_str.c_str(),pCurrChar->GetName() ,pCurrChar->GetGUIDLow());
if (!pCurrChar->IsStandState() && !pCurrChar->hasUnitState(UNIT_STAT_STUNNED))

View File

@@ -441,6 +441,7 @@ void WorldSession::LogoutPlayer(bool Save)
// e.g if he got disconnected during a transfer to another map
// calls to GetMap in this case may cause crashes
_player->CleanupsBeforeDelete();
sLog.outChar("Account: %d (IP: %s) Logout Character:[%s] (GUID: %u)", GetAccountId(), GetRemoteAddress().c_str(), _player->GetName() ,_player->GetGUIDLow());
Map* _map = _player->GetMap();
_map->Remove(_player, true);
SetPlayer(NULL); // deleted in Remove call