Skip to content

Commit

Permalink
Scripts/Commands: Fix ".help" command to show commands in alphabetica…
Browse files Browse the repository at this point in the history
…l order

(cherry picked from commit 841ce54)
  • Loading branch information
jackpoz authored and Carbenium committed Jan 20, 2016
1 parent e7f7ffa commit 36ed04b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/server/game/Scripting/ScriptMgr.cpp
Expand Up @@ -1045,6 +1045,12 @@ std::vector<ChatCommand> ScriptMgr::GetChatCommands()
table.insert(table.end(), cmds.begin(), cmds.end());
}

// Sort commands in alphabetical order
std::sort(table.begin(), table.end(), [](const ChatCommand& a, const ChatCommand&b)
{
return strcmp(a.Name, b.Name) < 0;
});

return table;
}

Expand Down

0 comments on commit 36ed04b

Please sign in to comment.