mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-19 08:55:32 +01:00
[svn] *** Source: MaNGOS ***
* Fixed english spelling in src/game/WorldSocket.h/cpp. Author: Derex * [240_world.sql] Create new command .senditems and remove from moderator level command .sendmail possibility send items. Author: Vladimir * Added new command: .sendmoney player "subject" "message" money - Sends a mail with money to a player. Author: fredi * Correctly apply taken damage debufs/bonuses in cases non-physical melee damage. Author: Frankir * Fix a crash in add friend/ignore callback. (check if player still logged in). Author: Hunuza * Better args checking in .sendmoney command. Author: Vladimir --HG-- branch : trunk
This commit is contained in:
@@ -462,20 +462,20 @@ int WorldSocket::handle_input_missing_data (void)
|
||||
{
|
||||
if (m_Header.space () > 0)
|
||||
{
|
||||
//need to recieve the header
|
||||
//need to receive the header
|
||||
const size_t to_header = (message_block.length () > m_Header.space () ? m_Header.space () : message_block.length ());
|
||||
m_Header.copy (message_block.rd_ptr (), to_header);
|
||||
message_block.rd_ptr (to_header);
|
||||
|
||||
if (m_Header.space () > 0)
|
||||
{
|
||||
//couldn't recieve the whole header this time
|
||||
// Couldn't receive the whole header this time
|
||||
ACE_ASSERT (message_block.length () == 0);
|
||||
errno = EWOULDBLOCK;
|
||||
return -1;
|
||||
}
|
||||
|
||||
//we just recieved nice new header
|
||||
// We just received nice new header
|
||||
if (handle_input_header () == -1)
|
||||
{
|
||||
ACE_ASSERT ((errno != EWOULDBLOCK) && (errno != EAGAIN));
|
||||
@@ -484,16 +484,16 @@ int WorldSocket::handle_input_missing_data (void)
|
||||
}
|
||||
|
||||
// Its possible on some error situations that this happens
|
||||
// for example on closing when epoll recieves more chunked data and stuff
|
||||
// for example on closing when epoll receives more chunked data and stuff
|
||||
// hope this is not hack ,as proper m_RecvWPct is asserted around
|
||||
if (!m_RecvWPct)
|
||||
{
|
||||
sLog.outError ("Forsing close on input m_RecvWPct = NULL");
|
||||
sLog.outError ("Forcing close on input m_RecvWPct = NULL");
|
||||
errno = EINVAL;
|
||||
return -1;
|
||||
}
|
||||
|
||||
// We have full readed header, now check the data payload
|
||||
// We have full read header, now check the data payload
|
||||
if (m_RecvPct.space () > 0)
|
||||
{
|
||||
//need more data in the payload
|
||||
@@ -503,14 +503,14 @@ int WorldSocket::handle_input_missing_data (void)
|
||||
|
||||
if (m_RecvPct.space () > 0)
|
||||
{
|
||||
//couldn't recieve the whole data this time
|
||||
//couldn't receive the whole data this time
|
||||
ACE_ASSERT (message_block.length () == 0);
|
||||
errno = EWOULDBLOCK;
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
//just recieved fresh new payload
|
||||
//just received fresh new payload
|
||||
if (handle_input_payload () == -1)
|
||||
{
|
||||
ACE_ASSERT ((errno != EWOULDBLOCK) && (errno != EAGAIN));
|
||||
@@ -572,7 +572,7 @@ int WorldSocket::ProcessIncoming (WorldPacket* new_pct)
|
||||
if (closing_)
|
||||
return -1;
|
||||
|
||||
// dump recieved packet
|
||||
// Dump received packet
|
||||
if (sWorldLog.LogWorld ())
|
||||
{
|
||||
sWorldLog.Log ("CLIENT:\nSOCKET: %u\nLENGTH: %u\nOPCODE: %s (0x%.4X)\nDATA:\n",
|
||||
@@ -637,7 +637,7 @@ int WorldSocket::ProcessIncoming (WorldPacket* new_pct)
|
||||
|
||||
int WorldSocket::HandleAuthSession (WorldPacket& recvPacket)
|
||||
{
|
||||
// NOTE: ATM the socket is singlethreaded, have this in mind ...
|
||||
// NOTE: ATM the socket is singlethread, have this in mind ...
|
||||
uint8 digest[20];
|
||||
uint32 clientSeed;
|
||||
uint32 unk2;
|
||||
@@ -929,7 +929,7 @@ int WorldSocket::HandlePing (WorldPacket& recvPacket)
|
||||
if (m_Session && m_Session->GetSecurity () == SEC_PLAYER)
|
||||
{
|
||||
sLog.outError ("WorldSocket::HandlePing: Player kicked for "
|
||||
"overspeeded pings adress = %s",
|
||||
"over-speed pings address = %s",
|
||||
GetRemoteAddress ().c_str ());
|
||||
|
||||
return -1;
|
||||
@@ -950,7 +950,7 @@ int WorldSocket::HandlePing (WorldPacket& recvPacket)
|
||||
{
|
||||
sLog.outError ("WorldSocket::HandlePing: peer sent CMSG_PING, "
|
||||
"but is not authenticated or got recently kicked,"
|
||||
" adress = %s",
|
||||
" address = %s",
|
||||
GetRemoteAddress ().c_str ());
|
||||
return -1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user