mirror of
https://github.com/EQEmu/Server.git
synced 2026-03-30 09:22:24 +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);
|
void command_pf(Client *c, const Seperator *message);
|
||||||
|
|
||||||
std::map<std::string, CommandRecord *> commandlist;
|
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
|
//All allocated CommandRecords get put in here so they get deleted on shutdown
|
||||||
LinkedList<CommandRecord *> cleanup_commandlist;
|
LinkedList<CommandRecord *> cleanup_commandlist;
|
||||||
@ -418,6 +419,8 @@ int command_init(void)
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
commandaliases.clear();
|
||||||
|
|
||||||
std::map<std::string, std::pair<uint8, std::vector<std::string>>> command_settings;
|
std::map<std::string, std::pair<uint8, std::vector<std::string>>> command_settings;
|
||||||
database.GetCommandSettings(command_settings);
|
database.GetCommandSettings(command_settings);
|
||||||
for (std::map<std::string, CommandRecord *>::iterator iter_cl = commandlist.begin(); iter_cl != commandlist.end(); ++iter_cl) {
|
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;
|
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)
|
void command_deinit(void)
|
||||||
{
|
{
|
||||||
commandlist.clear();
|
commandlist.clear();
|
||||||
|
commandaliases.clear();
|
||||||
|
|
||||||
command_dispatch = command_notavail;
|
command_dispatch = command_notavail;
|
||||||
commandcount = 0;
|
commandcount = 0;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user