[7503] Implement proper (not 2 level limited) help.security set for chat commands and subcommands. Update some commands data. Author: VladimirMangos

* Now `command` table loading set data for any use subcommand levels
    * Errors output for not existed in code commands at related data loading from table.
    * Detail log level report outout about overwrited security level for loaded chat command data.

    Using this functionality found and fixed/update data for `command` in mangos.sql

    NOTE: some command security levels changed.

    Thank you to benemorius for pointing to this security problem.

--HG--
branch : trunk
This commit is contained in:
megamage
2009-03-21 14:21:19 -06:00
parent 1ae90f3e9f
commit 3fd85fa5cd
5 changed files with 121 additions and 63 deletions

View File

@@ -1415,21 +1415,6 @@ bool ChatHandler::HandleAccountSetPasswordCommand(const char* args)
return true;
}
bool ChatHandler::HandleAllowMovementCommand(const char* /*args*/)
{
if(sWorld.getAllowMovement())
{
sWorld.SetAllowMovement(false);
SendSysMessage(LANG_CREATURE_MOVE_DISABLED);
}
else
{
sWorld.SetAllowMovement(true);
SendSysMessage(LANG_CREATURE_MOVE_ENABLED);
}
return true;
}
bool ChatHandler::HandleMaxSkillCommand(const char* /*args*/)
{
Player* SelectedPlayer = getSelectedPlayer();
@@ -4124,6 +4109,21 @@ bool ChatHandler::HandleNearGraveCommand(const char* args)
}
//-----------------------Npc Commands-----------------------
bool ChatHandler::HandleNpcAllowMovementCommand(const char* /*args*/)
{
if(sWorld.getAllowMovement())
{
sWorld.SetAllowMovement(false);
SendSysMessage(LANG_CREATURE_MOVE_DISABLED);
}
else
{
sWorld.SetAllowMovement(true);
SendSysMessage(LANG_CREATURE_MOVE_ENABLED);
}
return true;
}
bool ChatHandler::HandleNpcChangeEntryCommand(const char *args)
{
if(!args)