• R/O
  • SSH

Commit

Tags
No Tags

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 Beta for TSPG.


Commit MetaInfo

Revisiond4b2ea087ca825a23521a330838dceb1291246d8 (tree)
Time2022-06-27 00:12:39
AuthorAdam Kaminski <kaminskiadam9@gmai...>
CommiterAdam Kaminski

Log Message

Fixed: player names containing bad words weren't being filtered properly.

Change Summary

Incremental Difference

diff -r 3a849bc2e89f -r d4b2ea087ca8 src/sv_main.cpp
--- a/src/sv_main.cpp Tue Jun 21 20:09:46 2022 -0400
+++ b/src/sv_main.cpp Sun Jun 26 11:12:39 2022 -0400
@@ -2244,7 +2244,6 @@
22442244 kickReason = "User name contains illegal characters." ;
22452245 }
22462246
2247- bool filtered = BADWORDS_ShouldFilter( value.GetChars( ) );
22482247 FString message;
22492248
22502249 // [AK] Don't allow players to name themselves as "server" in order to avert
@@ -2258,10 +2257,13 @@
22582257 // If so, give the player a generic unused name and inform the client.
22592258 else if ( PLAYER_NameUsed ( value, g_lCurrentClient ) )
22602259 {
2261- message.Format ( "The name '%s' is %s. ", value.GetChars(), ( filtered ? "not allowed" : "already in use" ) );
2262- value = PLAYER_GenerateUniqueName();
2263- message.AppendFormat ( "You are renamed to '%s'.\n", value.GetChars() );
2264- message.AppendFormat ( "You have been renamed to '%s'.\n", value.GetChars() );
2260+ message.Format ( "The name '%s' is already in use. ", value.GetChars() );
2261+ bOverriddenName = true;
2262+ }
2263+ // [TSPG] Don't let players include bad words in their names.
2264+ else if ( BADWORDS_ShouldFilter ( value ) )
2265+ {
2266+ message.Format ( "The name '%s' is not allowed. ", value.GetChars() );
22652267 bOverriddenName = true;
22662268 }
22672269