[iortcw] 48/152: MP: Implement CD-Key/GUID check through sv_allowAnonymous cvar
Simon McVittie
smcv at debian.org
Fri Sep 8 10:39:58 UTC 2017
This is an automated email from the git hooks/post-receive script.
smcv pushed a commit to annotated tag 1.5a
in repository iortcw.
commit 29f05ca5fb3b84eb5ef2a633dcee78fcba8808a5
Author: MAN-AT-ARMS <M4N4T4RMS at gmail.com>
Date: Sat May 7 10:59:16 2016 -0400
MP: Implement CD-Key/GUID check through sv_allowAnonymous cvar
---
MP/code/server/sv_client.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/MP/code/server/sv_client.c b/MP/code/server/sv_client.c
index 9f8b748..8151c81 100644
--- a/MP/code/server/sv_client.c
+++ b/MP/code/server/sv_client.c
@@ -345,6 +345,7 @@ void SV_DirectConnect( netadr_t from ) {
intptr_t denied;
int count;
char *ip;
+ char *guid;
#ifdef LEGACY_PROTOCOL
qboolean compat = qfalse;
#endif
@@ -360,6 +361,16 @@ void SV_DirectConnect( netadr_t from ) {
Q_strncpyz( userinfo, Cmd_Argv( 1 ), sizeof( userinfo ) );
+ // Check for GUID
+ guid = Info_ValueForKey( userinfo, "cl_guid" );
+
+ if ( !sv_allowAnonymous->integer ) {
+ if ( !Q_stricmp( guid, "NO_GUID" ) ) {
+ NET_OutOfBandPrint(NS_SERVER, from, "print\nEmpty CD-Key or GUID not permitted on server.\n");
+ return;
+ }
+ }
+
// DHM - Nerve :: Update Server allows any protocol to connect
#ifndef UPDATE_SERVER
version = atoi(Info_ValueForKey(userinfo, "protocol"));
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/iortcw.git
More information about the Pkg-games-commits
mailing list