summaryrefslogtreecommitdiffstats
path: root/source
diff options
context:
space:
mode:
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