diff options
author | STRWarrior <niels.breuker@hotmail.nl> | 2014-06-17 16:19:31 +0200 |
---|---|---|
committer | STRWarrior <niels.breuker@hotmail.nl> | 2014-06-17 16:19:31 +0200 |
commit | 008a6ce311d3020927d5ef4b0d53905df48bcae5 (patch) | |
tree | 3469522650963adb96e8d732a81242fc4dc5c5ad /src | |
parent | HandleCommand now returns an CommandResult enum. (diff) | |
download | cuberite-008a6ce311d3020927d5ef4b0d53905df48bcae5.tar cuberite-008a6ce311d3020927d5ef4b0d53905df48bcae5.tar.gz cuberite-008a6ce311d3020927d5ef4b0d53905df48bcae5.tar.bz2 cuberite-008a6ce311d3020927d5ef4b0d53905df48bcae5.tar.lz cuberite-008a6ce311d3020927d5ef4b0d53905df48bcae5.tar.xz cuberite-008a6ce311d3020927d5ef4b0d53905df48bcae5.tar.zst cuberite-008a6ce311d3020927d5ef4b0d53905df48bcae5.zip |
Diffstat (limited to '')
-rw-r--r-- | src/Bindings/PluginManager.cpp | 4 | ||||
-rw-r--r-- | src/Bindings/PluginManager.h | 2 |
2 files changed, 4 insertions, 2 deletions
diff --git a/src/Bindings/PluginManager.cpp b/src/Bindings/PluginManager.cpp index abbb05ae0..c317ae362 100644 --- a/src/Bindings/PluginManager.cpp +++ b/src/Bindings/PluginManager.cpp @@ -1334,7 +1334,7 @@ cPluginManager::CommandResult cPluginManager::HandleCommand(cPlayer * a_Player, if (CallHookExecuteCommand(a_Player, Split)) { LOGINFO("Player %s tried executing command \"%s\" that was stopped by the HOOK_EXECUTE_COMMAND hook", a_Player->GetName().c_str(), Split[0].c_str()); - return crError; + return crBlocked; } if ( @@ -1345,7 +1345,7 @@ cPluginManager::CommandResult cPluginManager::HandleCommand(cPlayer * a_Player, { a_Player->SendMessageFailure(Printf("Forbidden command; insufficient privileges: \"%s\"", Split[0].c_str())); LOGINFO("Player %s tried to execute forbidden command: \"%s\"", a_Player->GetName().c_str(), Split[0].c_str()); - return crError; + return crNoPermission; } ASSERT(cmd->second.m_Plugin != NULL); diff --git a/src/Bindings/PluginManager.h b/src/Bindings/PluginManager.h index 049e70b49..96b7a979b 100644 --- a/src/Bindings/PluginManager.h +++ b/src/Bindings/PluginManager.h @@ -63,6 +63,8 @@ public: // tolua_export crExecuted, crUnknownCommand, crError, + crBlocked, + crNoPermission, } ; // tolua_begin |