mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-24 10:56:38 +01:00
Scripts/Commands: Fix a crash in .help - closes #25360
(cherry picked from commit 944f49d613)
This commit is contained in:
@@ -699,16 +699,16 @@ public:
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool HandleHelpCommand(ChatHandler* handler, Optional<std::string> cmdArg)
|
||||
static bool HandleHelpCommand(ChatHandler* handler, Tail cmdArg)
|
||||
{
|
||||
if (!cmdArg)
|
||||
if (cmdArg.empty())
|
||||
{
|
||||
handler->ShowHelpForCommand(ChatHandler::getCommandTable(), "help");
|
||||
handler->ShowHelpForCommand(ChatHandler::getCommandTable(), "");
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!handler->ShowHelpForCommand(ChatHandler::getCommandTable(), cmdArg->c_str()))
|
||||
if (!handler->ShowHelpForCommand(ChatHandler::getCommandTable(), std::string(cmdArg).c_str()))
|
||||
handler->SendSysMessage(LANG_NO_HELP_CMD);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user