This is a fork of Zandronum used on servers hosted by The Sentinels Playground (TSPG).
Revision | 764eb4b13ef99c92e843623e12cffd33a077ea6d (tree) |
---|---|
Time | 2022-06-27 00:12:39 |
Author | Adam Kaminski <kaminskiadam9@gmai...> |
Commiter | Adam Kaminski |
Fixed: player names containing bad words weren't being filtered properly.
@@ -2244,7 +2244,6 @@ | ||
2244 | 2244 | kickReason = "User name contains illegal characters." ; |
2245 | 2245 | } |
2246 | 2246 | |
2247 | - bool filtered = BADWORDS_ShouldFilter( value.GetChars( ) ); | |
2248 | 2247 | FString message; |
2249 | 2248 | |
2250 | 2249 | // [AK] Don't allow players to name themselves as "server" in order to avert |
@@ -2258,10 +2257,13 @@ | ||
2258 | 2257 | // If so, give the player a generic unused name and inform the client. |
2259 | 2258 | else if ( PLAYER_NameUsed ( value, g_lCurrentClient ) ) |
2260 | 2259 | { |
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() ); | |
2265 | 2267 | bOverriddenName = true; |
2266 | 2268 | } |
2267 | 2269 |