Added crBlocked and crNoPermission
This commit is contained in:
parent
15ae4ce233
commit
008a6ce311
@ -1334,7 +1334,7 @@ cPluginManager::CommandResult cPluginManager::HandleCommand(cPlayer * a_Player,
|
|||||||
if (CallHookExecuteCommand(a_Player, Split))
|
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());
|
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 (
|
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()));
|
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());
|
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);
|
ASSERT(cmd->second.m_Plugin != NULL);
|
||||||
|
@ -63,6 +63,8 @@ public: // tolua_export
|
|||||||
crExecuted,
|
crExecuted,
|
||||||
crUnknownCommand,
|
crUnknownCommand,
|
||||||
crError,
|
crError,
|
||||||
|
crBlocked,
|
||||||
|
crNoPermission,
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
// tolua_begin
|
// tolua_begin
|
||||||
|
Loading…
Reference in New Issue
Block a user