mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-17 19:05:42 +00:00
Core/Chat: properly prevent crashes + cleaning (import from TrinityCore)
- Closes #111
This commit is contained in:
@@ -962,6 +962,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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user