diff options
author | madmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2013-05-19 17:06:28 +0200 |
---|---|---|
committer | madmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2013-05-19 17:06:28 +0200 |
commit | 950d7f5f2de1235409e63b288bfdedcb3ec8e301 (patch) | |
tree | 6a3b2fe0dd397866d9b2ed5d46fd87c640c7b3cc | |
parent | Fixed entity chunking. (diff) | |
download | cuberite-950d7f5f2de1235409e63b288bfdedcb3ec8e301.tar cuberite-950d7f5f2de1235409e63b288bfdedcb3ec8e301.tar.gz cuberite-950d7f5f2de1235409e63b288bfdedcb3ec8e301.tar.bz2 cuberite-950d7f5f2de1235409e63b288bfdedcb3ec8e301.tar.lz cuberite-950d7f5f2de1235409e63b288bfdedcb3ec8e301.tar.xz cuberite-950d7f5f2de1235409e63b288bfdedcb3ec8e301.tar.zst cuberite-950d7f5f2de1235409e63b288bfdedcb3ec8e301.zip |
-rw-r--r-- | source/Player.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/source/Player.cpp b/source/Player.cpp index 1af1acdff..0fb9f5644 100644 --- a/source/Player.cpp +++ b/source/Player.cpp @@ -613,8 +613,14 @@ bool cPlayer::CanUseCommand( const AString & a_Command ) -bool cPlayer::HasPermission( const AString & a_Permission ) +bool cPlayer::HasPermission(const AString & a_Permission) { + if (a_Permission.empty()) + { + // Empty permission request is always granted + return true; + } + AStringVector Split = StringSplit( a_Permission, "." ); PermissionMap Possibilities = m_ResolvedPermissions; // Now search the namespaces |