mirror of
https://github.com/openmoh/openmohaa.git
synced 2025-04-28 21:57:57 +03:00
Using droperror instead of print
This commit is contained in:
parent
4b29c63fc9
commit
de16a72aed
1 changed files with 8 additions and 8 deletions
|
@ -293,7 +293,7 @@ void SV_DirectConnect( netadr_t from ) {
|
||||||
// Check whether this client is banned.
|
// Check whether this client is banned.
|
||||||
if(SV_IsBanned(&from, qfalse))
|
if(SV_IsBanned(&from, qfalse))
|
||||||
{
|
{
|
||||||
NET_OutOfBandPrint(NS_SERVER, from, "print\nYou are banned from this server.\n");
|
NET_OutOfBandPrint(NS_SERVER, from, "droperror\nYou are banned from this server.\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -308,7 +308,7 @@ void SV_DirectConnect( netadr_t from ) {
|
||||||
{
|
{
|
||||||
if(version != com_protocol->integer)
|
if(version != com_protocol->integer)
|
||||||
{
|
{
|
||||||
NET_OutOfBandPrint(NS_SERVER, from, "print\nServer uses protocol version %i "
|
NET_OutOfBandPrint(NS_SERVER, from, "droperror\nServer uses protocol version %i "
|
||||||
"(yours is %i).\n", com_protocol->integer, version);
|
"(yours is %i).\n", com_protocol->integer, version);
|
||||||
Com_DPrintf(" rejected connect from version %i\n", version);
|
Com_DPrintf(" rejected connect from version %i\n", version);
|
||||||
return;
|
return;
|
||||||
|
@ -342,7 +342,7 @@ void SV_DirectConnect( netadr_t from ) {
|
||||||
ip = (char *)NET_AdrToString( from );
|
ip = (char *)NET_AdrToString( from );
|
||||||
if( ( strlen( ip ) + strlen( userinfo ) + 4 ) >= MAX_INFO_STRING ) {
|
if( ( strlen( ip ) + strlen( userinfo ) + 4 ) >= MAX_INFO_STRING ) {
|
||||||
NET_OutOfBandPrint( NS_SERVER, from,
|
NET_OutOfBandPrint( NS_SERVER, from,
|
||||||
"print\nUserinfo string length exceeded. "
|
"droperror\nUserinfo string length exceeded. "
|
||||||
"Try removing setu cvars from your config.\n" );
|
"Try removing setu cvars from your config.\n" );
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -360,7 +360,7 @@ void SV_DirectConnect( netadr_t from ) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (i == MAX_CHALLENGES) {
|
if (i == MAX_CHALLENGES) {
|
||||||
NET_OutOfBandPrint( NS_SERVER, from, "print\nNo or bad challenge for address.\n" );
|
NET_OutOfBandPrint( NS_SERVER, from, "droperror\nNo or bad challenge for address.\n" );
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -372,7 +372,7 @@ void SV_DirectConnect( netadr_t from ) {
|
||||||
if ( !Sys_IsLANAddress( from ) ) {
|
if ( !Sys_IsLANAddress( from ) ) {
|
||||||
if ( sv_minPing->value && ping < sv_minPing->value ) {
|
if ( sv_minPing->value && ping < sv_minPing->value ) {
|
||||||
// don't let them keep trying until they get a big delay
|
// don't let them keep trying until they get a big delay
|
||||||
NET_OutOfBandPrint( NS_SERVER, from, "print\nServer is for high pings only\n" );
|
NET_OutOfBandPrint( NS_SERVER, from, "droperror\nServer is for high pings only\n" );
|
||||||
Com_DPrintf ("Client %i rejected on a too low ping\n", i);
|
Com_DPrintf ("Client %i rejected on a too low ping\n", i);
|
||||||
// reset the address otherwise their ping will keep increasing
|
// reset the address otherwise their ping will keep increasing
|
||||||
// with each connect message and they'd eventually be able to connect
|
// with each connect message and they'd eventually be able to connect
|
||||||
|
@ -380,7 +380,7 @@ void SV_DirectConnect( netadr_t from ) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if ( sv_maxPing->value && ping > sv_maxPing->value ) {
|
if ( sv_maxPing->value && ping > sv_maxPing->value ) {
|
||||||
NET_OutOfBandPrint( NS_SERVER, from, "print\nServer is for low pings only\n" );
|
NET_OutOfBandPrint( NS_SERVER, from, "droperror\nServer is for low pings only\n" );
|
||||||
Com_DPrintf ("Client %i rejected on a too high ping\n", i);
|
Com_DPrintf ("Client %i rejected on a too high ping\n", i);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -459,7 +459,7 @@ void SV_DirectConnect( netadr_t from ) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
NET_OutOfBandPrint( NS_SERVER, from, "print\nServer is full.\n" );
|
NET_OutOfBandPrint( NS_SERVER, from, "droperror\nServer is full.\n" );
|
||||||
Com_DPrintf ("Rejected a connection.\n");
|
Com_DPrintf ("Rejected a connection.\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -499,7 +499,7 @@ gotnewcl:
|
||||||
denied = ge->ClientConnect( clientNum, qtrue );
|
denied = ge->ClientConnect( clientNum, qtrue );
|
||||||
|
|
||||||
if ( denied ) {
|
if ( denied ) {
|
||||||
NET_OutOfBandPrint( NS_SERVER, from, "print\n%s\n", denied );
|
NET_OutOfBandPrint( NS_SERVER, from, "droperror\n%s\n", denied );
|
||||||
Com_DPrintf( "Game rejected a connection: %s.\n", denied );
|
Com_DPrintf( "Game rejected a connection: %s.\n", denied );
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue