mirror of
https://github.com/nillerusr/source-engine.git
synced 2025-01-12 08:08:06 +00:00
engine: remove PROTOCOL_STEAM requirement
This commit is contained in:
parent
edc8d6c584
commit
f7233c84e0
@ -570,7 +570,7 @@ bool CBaseClientState::PrepareSteamConnectResponse( uint64 unGSSteamID, bool bGS
|
||||
return true;
|
||||
}
|
||||
|
||||
#if !defined( NO_STEAM ) && !defined( SWDS )
|
||||
#if 0 //!defined( NO_STEAM ) && !defined( SWDS )
|
||||
if ( !Steam3Client().SteamUser() )
|
||||
{
|
||||
COM_ExplainDisconnection( true, "#GameUI_ServerRequireSteam" );
|
||||
@ -585,7 +585,7 @@ bool CBaseClientState::PrepareSteamConnectResponse( uint64 unGSSteamID, bool bGS
|
||||
checkAdr.SetIP( net_local_adr.GetIPHostByteOrder() );
|
||||
}
|
||||
|
||||
#ifndef SWDS
|
||||
#if 0 // #ifndef SWDS
|
||||
// now append the steam3 cookie
|
||||
char steam3Cookie[ STEAM_KEYSIZE ];
|
||||
uint32 steam3CookieLen = 0;
|
||||
@ -936,6 +936,7 @@ bool CBaseClientState::ProcessConnectionlessPacket( netpacket_t *packet )
|
||||
int authprotocol = msg.ReadLong();
|
||||
uint64 unGSSteamID = 0;
|
||||
bool bGSSecure = false;
|
||||
#if 0
|
||||
if ( authprotocol == PROTOCOL_STEAM )
|
||||
{
|
||||
if ( msg.ReadShort() != 0 )
|
||||
@ -963,6 +964,7 @@ bool CBaseClientState::ProcessConnectionlessPacket( netpacket_t *packet )
|
||||
return false;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
SendConnectPacket( challenge, authprotocol, unGSSteamID, bGSSecure );
|
||||
}
|
||||
break;
|
||||
|
@ -741,7 +741,7 @@ bool CBaseServer::ProcessConnectionlessPacket(netpacket_t * packet)
|
||||
// break;
|
||||
// }
|
||||
|
||||
if ( authProtocol == PROTOCOL_STEAM )
|
||||
/* if ( authProtocol == PROTOCOL_STEAM )
|
||||
{
|
||||
int keyLen = msg.ReadShort();
|
||||
if ( keyLen < 0 || keyLen > sizeof(cdkey) )
|
||||
@ -753,7 +753,7 @@ bool CBaseServer::ProcessConnectionlessPacket(netpacket_t * packet)
|
||||
|
||||
ConnectClient( packet->from, protocol, challengeNr, clientChallenge, authProtocol, name, password, cdkey, keyLen ); // cd key is actually a raw encrypted key
|
||||
}
|
||||
else
|
||||
else*/
|
||||
{
|
||||
msg.ReadString( cdkey, sizeof(cdkey) );
|
||||
ConnectClient( packet->from, protocol, challengeNr, clientChallenge, authProtocol, name, password, cdkey, strlen(cdkey) );
|
||||
@ -1434,11 +1434,13 @@ bool CBaseServer::CheckChallengeType( CBaseClient * client, int nNewUserID, neta
|
||||
return false;
|
||||
}
|
||||
|
||||
#if 0
|
||||
if ( ( nAuthProtocol == PROTOCOL_HASHEDCDKEY ) && (Q_strlen( pchLogonCookie ) <= 0 || Q_strlen(pchLogonCookie) != 32 ) )
|
||||
{
|
||||
RejectConnection( adr, clientChallenge, "#GameUI_ServerRejectInvalidCertLen" );
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
|
||||
Assert( !IsReplay() );
|
||||
|
||||
@ -1470,23 +1472,24 @@ bool CBaseServer::CheckChallengeType( CBaseClient * client, int nNewUserID, neta
|
||||
client->SetSteamID( CSteamID() ); // set an invalid SteamID
|
||||
|
||||
// Convert raw certificate back into data
|
||||
if ( cbCookie <= 0 || cbCookie >= STEAM_KEYSIZE )
|
||||
/* if ( cbCookie <= 0 || cbCookie >= STEAM_KEYSIZE )
|
||||
{
|
||||
RejectConnection( adr, clientChallenge, "#GameUI_ServerRejectInvalidSteamCertLen" );
|
||||
return false;
|
||||
}
|
||||
}*/
|
||||
netadr_t checkAdr = adr;
|
||||
if ( adr.GetType() == NA_LOOPBACK || adr.IsLocalhost() )
|
||||
{
|
||||
checkAdr.SetIP( net_local_adr.GetIPHostByteOrder() );
|
||||
}
|
||||
|
||||
#if 0
|
||||
if ( !Steam3Server().NotifyClientConnect( client, nNewUserID, checkAdr, pchLogonCookie, cbCookie )
|
||||
&& !Steam3Server().BLanOnly() ) // the userID isn't alloc'd yet so we need to fill it in manually
|
||||
{
|
||||
RejectConnection( adr, clientChallenge, "#GameUI_ServerRejectSteam" );
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
|
||||
//
|
||||
// Any rejections below this must call SendUserDisconnect
|
||||
|
Loading…
Reference in New Issue
Block a user