From 950d7f5f2de1235409e63b288bfdedcb3ec8e301 Mon Sep 17 00:00:00 2001 From: "madmaxoft@gmail.com" Date: Sun, 19 May 2013 15:06:28 +0000 Subject: Empty permission is always granted git-svn-id: http://mc-server.googlecode.com/svn/trunk@1490 0a769ca7-a7f5-676a-18bf-c427514a06d6 --- source/Player.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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 -- cgit v1.2.3