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
  • Loading branch information
jackpoz committed Jan 4, 2016
1 parent f22b193 commit 841ce54
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/server/game/Scripting/ScriptMgr.cpp
Expand Up @@ -1042,6 +1042,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 841ce54

Please sign in to comment.