• R/O
  • SSH

コミット

タグ
未設定

よく使われているワード(クリックで追加)

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

This is a fork of Zandronum Beta for TSPG.


コミットメタ情報

リビジョン3731e2f6d00a3fb0a7cd33c5b6db5d9b527fa84b (tree)
日時2022-06-27 00:37:18
作者Adam Kaminski <kaminskiadam9@gmai...>
コミッターAdam Kaminski

ログメッセージ

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

変更サマリ

差分

diff -r d4b2ea087ca8 -r 3731e2f6d00a 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;