#include <ePlayer.h>
Public Member Functions | |
eAccessLevelHolder () | |
tAccessLevel | GetAccessLevel () const |
void | SetAccessLevel (tAccessLevel level) |
Private Attributes | |
tAccessLevel | accessLevel |
admin access level of the current user |
Definition at line 129 of file ePlayer.h.
eAccessLevelHolder::eAccessLevelHolder | ( | ) |
Definition at line 76 of file ePlayer.cpp.
References accessLevel, and tAccessLevel_Default.
00077 { 00078 accessLevel = tAccessLevel_Default; 00079 }
tAccessLevel eAccessLevelHolder::GetAccessLevel | ( | ) | const [inline] |
Definition at line 134 of file ePlayer.h.
References accessLevel.
Referenced by eVoter::HandleChat(), ePlayerNetID::IsLoggedIn(), se_ChatMsg(), se_ChatShuffle(), se_ChatTeam(), se_GetAccessLevel(), se_IsNameTaken(), se_ListPlayers(), ePlayerNetID::TeamChangeAllowed(), ePlayerNetID::Update(), and ePlayerNetID::UpdateName().
00134 { return accessLevel; }
void eAccessLevelHolder::SetAccessLevel | ( | tAccessLevel | level | ) |
Definition at line 81 of file ePlayer.cpp.
References accessLevel, con, tCurrentAccessLevel::GetAccessLevel(), and st_Breakpoint().
Referenced by ePlayerNetID::BeLoggedIn(), and ePlayerNetID::BeNotLoggedIn().
00082 { 00083 // sanity check. The access level must not be set higher than that of the current context. 00084 // since accessLevel is private, all access level changes need to run over this function; 00085 // it is therefore impossible to get access level escalation bugs without memory overwrites 00086 // or, of course, evil intentions. 00087 if ( level < tCurrentAccessLevel::GetAccessLevel() ) 00088 { 00089 con << "INTERNAL ERROR, security violation attempted. Clamping it.\n"; 00090 st_Breakpoint(); 00091 accessLevel = tCurrentAccessLevel::GetAccessLevel(); 00092 } 00093 00094 accessLevel = level; 00095 }
tAccessLevel eAccessLevelHolder::accessLevel [private] |
admin access level of the current user
Definition at line 138 of file ePlayer.h.
Referenced by eAccessLevelHolder(), GetAccessLevel(), and SetAccessLevel().