From c9ecca1a56108096dc1209e93e4e2717dd80c760 Mon Sep 17 00:00:00 2001 From: Uleat Date: Mon, 14 Dec 2015 17:38:24 -0500 Subject: [PATCH] Added 'alias added' message and commmandaliases list (future use) --- zone/command.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/zone/command.cpp b/zone/command.cpp index 3ec0328ee..ca6521789 100644 --- a/zone/command.cpp +++ b/zone/command.cpp @@ -84,6 +84,7 @@ void command_bestz(Client *c, const Seperator *message); void command_pf(Client *c, const Seperator *message); std::map commandlist; +std::map commandaliases; //All allocated CommandRecords get put in here so they get deleted on shutdown LinkedList cleanup_commandlist; @@ -418,6 +419,8 @@ int command_init(void) return -1; } + commandaliases.clear(); + std::map>> command_settings; database.GetCommandSettings(command_settings); for (std::map::iterator iter_cl = commandlist.begin(); iter_cl != commandlist.end(); ++iter_cl) { @@ -442,6 +445,9 @@ int command_init(void) } commandlist[*iter_aka] = iter_cl->second; + commandaliases[*iter_aka] = iter_cl->first; + + Log.Out(Logs::General, Logs::Commands, "command_init(): - Alias '%s' added to command '%s'.", iter_aka->c_str(), commandaliases[*iter_aka].c_str()); } } @@ -461,6 +467,7 @@ int command_init(void) void command_deinit(void) { commandlist.clear(); + commandaliases.clear(); command_dispatch = command_notavail; commandcount = 0;