From a05e8cbd49a17dfc4023b71da559dcb1b11d8422 Mon Sep 17 00:00:00 2001 From: MaeJong Date: Thu, 4 May 2017 15:14:32 +0200 Subject: Implement cvars for SM2 autobahn & outdated client messages Remove obsolete int g_updateClientNotice Add g_outdatedClientMessage & prompt only if it's non-empty Add g_schachtmeisterAutobahnMessage (existed, was unused) --- src/game/g_client.c | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) (limited to 'src/game/g_client.c') diff --git a/src/game/g_client.c b/src/game/g_client.c index 99d26c7..c670f59 100644 --- a/src/game/g_client.c +++ b/src/game/g_client.c @@ -1571,7 +1571,7 @@ char *ClientConnect( int clientNum, qboolean firstTime ) if( j->rating >= g_schachtmeisterClearThreshold.integer ) break; else if( j->rating <= g_schachtmeisterAutobahnThreshold.integer ) - return "fuck off"; + return g_schachtmeisterAutobahnMessage.string; G_AdminsPrintf( "%s^7 (#%d) has rating %d\n", ent->client->pers.netname, ent - g_entities, j->rating ); } break; @@ -1680,16 +1680,11 @@ void ClientBegin( int clientNum ) G_LogPrintf( "ClientBegin: %i\n", clientNum ); - if( g_clientUpgradeNotice.integer ) + if( !Q_stricmp( ent->client->pers.guid, "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" ) && + g_outdatedClientMessage.string[0] ) { - if( !Q_stricmp( ent->client->pers.guid, "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" ) ) - { - trap_SendServerCommand( client->ps.clientNum, va( - "print \"^1Your client is out of date. Please replace your client " - "executable with the one at ^2http://tinyurl.com/upcldl^1 (or " - "^2https://mirror.kdude63.com/mercenaries_guild/archive/Client_Binaries/TremFusion/^1) " - "(choose the right one for your operating system) and reconnect.\n\"" ) ); - } + trap_SendServerCommand( client->ps.clientNum, va( + "print \"%s\n\"", g_outdatedClientMessage.string ) ); } // count current clients and rank for scoreboard -- cgit