Finish review/fix commands appropriate for console. Allow call 'help' command without args.

This commit is contained in:
VladimirMangos 2008-10-23 20:44:30 +04:00
parent e31709611d
commit 89893215e5
8 changed files with 55 additions and 29 deletions

View file

@ -33,15 +33,17 @@
bool ChatHandler::HandleHelpCommand(const char* args)
{
if(!*args)
return false;
char* cmd = strtok((char*)args, " ");
if(!cmd)
return false;
if(!ShowHelpForCommand(getCommandTable(), cmd))
SendSysMessage(LANG_NO_HELP_CMD);
{
ShowHelpForCommand(getCommandTable(), "help");
ShowHelpForCommand(getCommandTable(), "");
}
else
{
if(!ShowHelpForCommand(getCommandTable(), cmd))
SendSysMessage(LANG_NO_HELP_CMD);
}
return true;
}