From: <baz...@us...> - 2008-02-08 13:48:03
|
Revision: 7802 http://armagetronad.svn.sourceforge.net/armagetronad/?rev=7802&view=rev Author: bazaarmagetron Date: 2008-02-08 05:48:03 -0800 (Fri, 08 Feb 2008) Log Message: ----------- Fixed compilation on non-armathentication builds. Modified Paths: -------------- armagetronad/branches/0.2.8/armagetronad/src/engine/ePlayer.cpp armagetronad/branches/0.2.8/armagetronad/src/engine/ePlayer.h Added Paths: ----------- armagetronad/branches/0.2.8/armagetronad/ Removed Paths: ------------- armagetronad/branches/0.2.8/armagetronad/ Copied: armagetronad/branches/0.2.8/armagetronad (from rev 7800, armagetronad/branches/0.2.8/armagetronad) Property changes on: armagetronad/branches/0.2.8/armagetronad ___________________________________________________________________ Name: bzr:revision-info + timestamp: 2008-02-08 14:38:45.589999914 +0100 committer: Manuel Mooos <z-...@us...> properties: branch-nick: 0.2.8-armagetronad-work Name: bzr:file-ids + Name: bzr:revision-id:v3-list-QlpoOTFBWSZTWZvbKhsAAAdRgAAQABK6798QIABURMgAAaeoNT1TxT1DQbKaeobXKiyAmlWT7Y5MkdJOtXDtB7w7DOGFBHiOBxaUIu7HQyyQSvxdyRThQkJvbKhs + 538 z-...@us...-20080207163247-91eo4mrbiind6xrz 540 z-...@us...-20080208122252-nvhak6io6j0ui3aa 541 z-...@us...-20080208123045-76r9p0l7iwpbq1hy 542 z-...@us...-20080208124439-10s870zpb61b8buo 543 z-...@us...-20080208133845-a22a5j0z6vjgfaby Name: svn:ignore + config.sub install-sh Eclipse* configure version.h CVS doc_bak log leak.history config.cache config.log .gdbinit config.h Makefile leak.log diff scorelog.txt ladder.txt highscores.txt config.status won_matches.txt mainicon.ico .dont_update screenshot_1.bmp won_rounds.txt Makefile.global memprofile* frommaster.srv screenshot* ml astat master bindist master_list.srv big_brother master.srv *.dll *.ilk README.txt README-SDL.txt update.bat tagcvs .infiles autom4te.cache config.h.stamp Testme html.m4 var ded .beautytag* config.h.in aclocal.m4 ChangeLog INSTALL Makefile.in missing COPYING version depcomp .version.new .cvsfiles stamp-h1 touch universal_variable_substitutions universal_variable_values.in universal_variables extrapaths universal_variable_values_makefile macosx_build_information.yml Modified: armagetronad/branches/0.2.8/armagetronad/src/engine/ePlayer.cpp =================================================================== --- armagetronad/branches/0.2.8/armagetronad/src/engine/ePlayer.cpp 2008-02-08 12:52:15 UTC (rev 7800) +++ armagetronad/branches/0.2.8/armagetronad/src/engine/ePlayer.cpp 2008-02-08 13:48:03 UTC (rev 7802) @@ -2789,7 +2789,7 @@ { // player username comes from authentication name and may be much different from // the screen name - tos << se_EscapeName( p2->GetRawAuthenticatedName() ) << " ( " << p2->GetName() << ", " + tos << p2->GetFilteredAuthenticatedName() << " ( " << p2->GetName() << ", " << tCurrentAccessLevel::GetName( p2->GetAccessLevel() ) << " )"; } @@ -4071,7 +4071,7 @@ if ( alias != "" ) { rawAuthenticatedName_ = alias; - newAuthenticatedName = se_EscapeName( rawAuthenticatedName_ ).c_str(); + newAuthenticatedName = GetFilteredAuthenticatedName(); // elevate access level again according to the new alias se_CheckAccessLevel( accessLevel_, newAuthenticatedName ); @@ -4125,11 +4125,11 @@ { if ( admin ) { - se_SecretConsoleOut( tOutput( "$logout_message_deop", GetName(), se_EscapeName( rawAuthenticatedName_ ).c_str(), admin->GetLogName() ), this, admin ); + se_SecretConsoleOut( tOutput( "$logout_message_deop", GetName(), GetFilteredAuthenticatedName(), admin->GetLogName() ), this, admin ); } else { - se_SecretConsoleOut( tOutput( "$logout_message", GetName(), se_EscapeName( rawAuthenticatedName_ ).c_str() ), this ); + se_SecretConsoleOut( tOutput( "$logout_message", GetName(), GetFilteredAuthenticatedName() ), this ); } } @@ -6410,7 +6410,7 @@ // take the user name to be the authenticated name if ( IsAuthenticated() ) { - userName_ = se_EscapeName( rawAuthenticatedName_ ).c_str(); + userName_ = GetFilteredAuthenticatedName(); if ( se_legacyLogNames ) { userName_ = tString( "0:" ) + userName_; @@ -6622,6 +6622,25 @@ return *this; } +// ****************************************************************************************** +// * +// * GetFilteredAuthenticatedName +// * +// ****************************************************************************************** +//! +//! @return The filtered authentication name, or "" if no authentication is supported or the player is not authenticated +//! +// ****************************************************************************************** + +tString ePlayerNetID::GetFilteredAuthenticatedName( void ) const +{ +#ifdef KRAWALL_SERVER + return se_EscapeName( GetRawAuthenticatedName() ).c_str(); +#else + return tString(""); +#endif +} + // allow enemies from the same IP? static bool se_allowEnemiesSameIP = false; static tSettingItem< bool > se_allowEnemiesSameIPConf( "ALLOW_ENEMIES_SAME_IP", se_allowEnemiesSameIP ); Modified: armagetronad/branches/0.2.8/armagetronad/src/engine/ePlayer.h =================================================================== --- armagetronad/branches/0.2.8/armagetronad/src/engine/ePlayer.h 2008-02-08 12:52:15 UTC (rev 7800) +++ armagetronad/branches/0.2.8/armagetronad/src/engine/ePlayer.h 2008-02-08 13:48:03 UTC (rev 7802) @@ -373,6 +373,7 @@ inline ePlayerNetID const & GetUserName( tString & userName ) const; //!< Gets this player's name, cleared for system logs. Use for writing to files or comparing with admin input. tString const & GetLogName( void ) const{ return GetUserName(); } //!< Gets this player's name, cleared for system logs (with escaped special characters). Use for writing to files. + tString GetFilteredAuthenticatedName( void ) const; //!< Gets the filtered, ecaped authentication name #ifdef KRAWALL_SERVER tString const & GetRawAuthenticatedName( void ) const{ return rawAuthenticatedName_; } //!< Gets the raw, unescaped authentication name void SetRawAuthenticatedName( tString const & name ){ if ( !IsAuthenticated()) rawAuthenticatedName_ = name; } //!< Sets the raw, unescaped authentication name This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |