• R/O
  • SSH

Commit

Tags
Aucun tag

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

This is a fork of Zandronum used on servers hosted by The Sentinels Playground (TSPG).


Commit MetaInfo

Révision14feaa6d9045bef49708f8db16b661b87d7a698e (tree)
l'heure2022-06-27 00:37:18
AuteurAdam Kaminski <kaminskiadam9@gmai...>
CommiterAdam Kaminski

Message de Log

Servers now check for bad words in the hostname and will shut down if any bad words are found.

Change Summary

Modification

diff -r 764eb4b13ef9 -r 14feaa6d9045 src/sv_master.cpp
--- a/src/sv_master.cpp Sun Jun 26 11:12:39 2022 -0400
+++ b/src/sv_master.cpp Sun Jun 26 11:37:18 2022 -0400
@@ -753,6 +753,8 @@
753753
754754 CVAR(String, tspg_branding_hostnameprefix, "", CVAR_SERVERINFO|TSPG_NOSET);
755755
756+// [TSPG] This declaration is needed in order to filter bad words in the hostname.
757+bool BADWORDS_ShouldFilter( const char *text );
756758 // Name of this server on launchers.
757759 CUSTOM_CVAR( String, sv_hostname, "Unnamed " GAMENAME " server", CVAR_ARCHIVE|CVAR_NOSETBYACS|CVAR_SERVERINFO )
758760 {
@@ -763,6 +765,16 @@
763765 return;
764766 }
765767
768+ // [TSPG] Don't allow any bad words if found in the new hostname.
769+ if ( BADWORDS_ShouldFilter( self ))
770+ {
771+ Printf( "ERROR: An inappropriate hostname was used. Please don't include any bad words in it.\n" );
772+ self = "Please use an appropriate hostname";
773+
774+ // [TSPG] If this happens, just shut down the server.
775+ exit( 0 );
776+ }
777+
766778 if (static_cast<const char *>(tspg_branding_hostnameprefix)[0] != '\0')
767779 {
768780 tspgPrefixLock = true;