mirror of
https://github.com/Mauler125/r5sdk.git
synced 2025-02-09 19:15:03 +01:00
RConServer: remove extraneous copy
CSocketCreator::GetAcceptedSocketAddress() returns a reference.
This commit is contained in:
parent
52b84fc3b7
commit
a27f1b7fc9
@ -341,7 +341,7 @@ void CRConServer::Authenticate(const cl_rcon::request& request, CConnectedNetCon
|
||||
}
|
||||
else // Bad password.
|
||||
{
|
||||
const netadr_t netAdr = m_Socket.GetAcceptedSocketAddress(m_nConnIndex);
|
||||
const netadr_t& netAdr = m_Socket.GetAcceptedSocketAddress(m_nConnIndex);
|
||||
if (sv_rcon_debug->GetBool())
|
||||
{
|
||||
Msg(eDLL_T::SERVER, "Bad RCON password attempt from '%s'\n", netAdr.ToString());
|
||||
@ -509,7 +509,7 @@ bool CRConServer::CheckForBan(CConnectedNetConsoleData& data)
|
||||
return false;
|
||||
}
|
||||
|
||||
const netadr_t netAdr = m_Socket.GetAcceptedSocketAddress(m_nConnIndex);
|
||||
const netadr_t& netAdr = m_Socket.GetAcceptedSocketAddress(m_nConnIndex);
|
||||
const char* szNetAdr = netAdr.ToString(true);
|
||||
|
||||
if (m_BannedList.size() >= RCON_MAX_BANNEDLIST_SIZE)
|
||||
@ -581,7 +581,7 @@ void CRConServer::Disconnect(const int nIndex, const char* szReason) // NETMGR
|
||||
if (data.m_bAuthorized)
|
||||
{
|
||||
// Inform server owner when authenticated connection has been closed.
|
||||
netadr_t netAdr = m_Socket.GetAcceptedSocketAddress(nIndex);
|
||||
const netadr_t& netAdr = m_Socket.GetAcceptedSocketAddress(nIndex);
|
||||
if (!szReason)
|
||||
{
|
||||
szReason = "unknown reason";
|
||||
|
Loading…
x
Reference in New Issue
Block a user