Append "demo" to the keywords if fs_restrict is enabled
Some checks failed
CodeQL / Analyze (push) Waiting to run
Build branch / build-all (push) Failing after 16s

This commit is contained in:
smallmodel 2024-12-15 21:32:34 +01:00
parent 79643d963e
commit 932367d061
No known key found for this signature in database
GPG key ID: 9F2D623CEDF08512

View file

@ -510,6 +510,14 @@ void SVC_Status( netadr_t from ) {
// to prevent timed spoofed reply packets that add ghost servers
Info_SetValueForKey( infostring, "challenge", Cmd_Argv(1) );
if (Cvar_VariableIntegerValue("fs_restrict")) {
char keywords[MAX_INFO_STRING];
// Append "demo" at the beginning of the keywords
Com_sprintf(keywords, sizeof(keywords), "demo %s", Info_ValueForKey(infostring, "sv_keywords"));
Info_SetValueForKey(infostring, "sv_keywords", keywords);
}
status[0] = 0;
statusLength = 0;