[3.3.5] ChatCommands, the other half: chat command resolution refactor (PR #25463)

(cherry picked from commit 1eca51b417)
This commit is contained in:
Treeston
2020-09-20 02:50:38 +02:00
committed by Shauren
parent 7a2c3af988
commit 3fd2eb126c
57 changed files with 1360 additions and 1294 deletions

View File

@@ -37,18 +37,18 @@ class event_commandscript : public CommandScript
public:
event_commandscript() : CommandScript("event_commandscript") { }
std::vector<ChatCommand> GetCommands() const override
ChatCommandTable GetCommands() const override
{
static std::vector<ChatCommand> eventCommandTable =
static ChatCommandTable eventCommandTable =
{
{ "activelist", rbac::RBAC_PERM_COMMAND_EVENT_ACTIVELIST, true, &HandleEventActiveListCommand, "" },
{ "start", rbac::RBAC_PERM_COMMAND_EVENT_START, true, &HandleEventStartCommand, "" },
{ "stop", rbac::RBAC_PERM_COMMAND_EVENT_STOP, true, &HandleEventStopCommand, "" },
{ "info", rbac::RBAC_PERM_COMMAND_EVENT, true, &HandleEventInfoCommand, "" },
{ "activelist", HandleEventActiveListCommand, rbac::RBAC_PERM_COMMAND_EVENT_ACTIVELIST, Console::Yes },
{ "start", HandleEventStartCommand, rbac::RBAC_PERM_COMMAND_EVENT_START, Console::Yes },
{ "stop", HandleEventStopCommand, rbac::RBAC_PERM_COMMAND_EVENT_STOP, Console::Yes },
{ "info", HandleEventInfoCommand, rbac::RBAC_PERM_COMMAND_EVENT_INFO, Console::Yes },
};
static std::vector<ChatCommand> commandTable =
static ChatCommandTable commandTable =
{
{ "event", rbac::RBAC_PERM_COMMAND_EVENT, false, nullptr, "", eventCommandTable },
{ "event", eventCommandTable },
};
return commandTable;
}