summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2013-05-19 17:06:28 +0200
committermadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2013-05-19 17:06:28 +0200
commit950d7f5f2de1235409e63b288bfdedcb3ec8e301 (patch)
tree6a3b2fe0dd397866d9b2ed5d46fd87c640c7b3cc
parentFixed entity chunking. (diff)
downloadcuberite-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
Diffstat (limited to '')
-rw-r--r--source/Player.cpp8
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