mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-21 01:37:37 +01:00
mangosd->trinitycore & realmd->trinityrealm
--HG-- branch : trunk
This commit is contained in:
@@ -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
|
||||
@@ -257,4 +257,3 @@ void RASocket::zprint( const char * szText )
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user