summaryrefslogtreecommitdiff
path: root/src/game/g_client.c
diff options
context:
space:
mode:
authorMaeJong <mewiceclair@gmail.com>2017-05-04 15:14:32 +0200
committerMaeJong <mewiceclair@gmail.com>2017-05-04 15:14:32 +0200
commita05e8cbd49a17dfc4023b71da559dcb1b11d8422 (patch)
tree3f441c8eaad975261a285a9ccd0450094cd8a12f /src/game/g_client.c
parent36f8fc13c89ea751456a17be1ec4b5d2110d44c0 (diff)
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)
Diffstat (limited to 'src/game/g_client.c')
-rw-r--r--src/game/g_client.c15
1 files changed, 5 insertions, 10 deletions
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