• R/O
  • SSH

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#objective-cqtwindows誰得cocoapythonphprubygameguibathyscaphec翻訳omegat計画中(planning stage)frameworktwittertestdomvb.netdirectxbtronarduinopreviewerゲームエンジン

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


Commit MetaInfo

Revision764eb4b13ef99c92e843623e12cffd33a077ea6d (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 57f314bcb5fa -r 764eb4b13ef9 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