• 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

Revision2e7806885db5bd8c5b2b6fa9e996b288da7947fd (tree)
Time2022-02-04 23:44:20
AuthorAdam Kaminski <kaminskiadam9@gmai...>
CommiterAdam Kaminski

Log Message

SERVERBAN_BanPlayer now saves the player's uncolored name with FString instead of C-style char arrays.

Change Summary

Incremental Difference

diff -r beb1e90cb809 -r 2e7806885db5 src/sv_ban.cpp
--- a/src/sv_ban.cpp Fri Jan 28 18:43:29 2022 -0500
+++ b/src/sv_ban.cpp Fri Feb 04 09:44:20 2022 -0500
@@ -424,13 +424,12 @@
424424 }
425425
426426 // Removes the color codes from the player name, for the ban record.
427- char szPlayerName[64];
428- sprintf( szPlayerName, "%s", players[ulPlayer].userinfo.GetName() );
429- V_RemoveColorCodes( szPlayerName );
427+ FString playerName = players[ulPlayer].userinfo.GetName();
428+ V_RemoveColorCodes( playerName );
430429
431430 // Add the ban and kick the player.
432431 std::string message;
433- g_ServerBans.addEntry( SERVER_GetClient( ulPlayer )->Address.ToString(), szPlayerName, pszBanReason, message, tExpiration );
432+ g_ServerBans.addEntry( SERVER_GetClient( ulPlayer )->Address.ToString(), playerName, pszBanReason, message, tExpiration );
434433 Printf( "addban: %s", message.c_str() );
435434 SERVER_KickPlayer( ulPlayer, pszBanReason ? pszBanReason : "" ); // [RC] serverban_KickBannedPlayers would cover this, but we want the messages to be distinct so there's no confusion.
436435