mirror of
https://github.com/EQEmu/Server.git
synced 2026-02-16 04:32:25 +00:00
Added 'alias added' message and commmandaliases list (future use)
This commit is contained in:
parent
2fb63d4d26
commit
c9ecca1a56
@ -84,6 +84,7 @@ void command_bestz(Client *c, const Seperator *message);
|
||||
void command_pf(Client *c, const Seperator *message);
|
||||
|
||||
std::map<std::string, CommandRecord *> commandlist;
|
||||
std::map<std::string, std::string> commandaliases;
|
||||
|
||||
//All allocated CommandRecords get put in here so they get deleted on shutdown
|
||||
LinkedList<CommandRecord *> cleanup_commandlist;
|
||||
@ -418,6 +419,8 @@ int command_init(void)
|
||||
return -1;
|
||||
}
|
||||
|
||||
commandaliases.clear();
|
||||
|
||||
std::map<std::string, std::pair<uint8, std::vector<std::string>>> command_settings;
|
||||
database.GetCommandSettings(command_settings);
|
||||
for (std::map<std::string, CommandRecord *>::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;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user