mirror of
https://github.com/mangosfour/server.git
synced 2025-12-16 04:37:00 +00:00
Finish review/fix commands appropriate for console. Allow call 'help' command without args.
This commit is contained in:
parent
e31709611d
commit
89893215e5
8 changed files with 55 additions and 29 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue