class CoreExport CommandParser
{
public:
- typedef Commandtable CommandMap;
+ typedef TR1NS::unordered_map<std::string, Command*> CommandMap;
private:
/** Process a command from a user.
/** Command list, a hash_map of command names to Command*
*/
- Commandtable cmdlist;
+ CommandMap cmdlist;
public:
/** Default constructor.
/** Files read by the configuration */
typedef std::map<std::string, file_cache> ConfigFileCache;
-/** A hash of commands used by the core
- */
-typedef TR1NS::unordered_map<std::string, Command*> Commandtable;
-
/** Membership list of a channel */
typedef std::map<User*, Membership*> UserMembList;
/** Iterator of UserMembList */
Command* CommandParser::GetHandler(const std::string &commandname)
{
- Commandtable::iterator n = cmdlist.find(commandname);
+ CommandMap::iterator n = cmdlist.find(commandname);
if (n != cmdlist.end())
return n->second;
CmdResult CommandParser::CallHandler(const std::string& commandname, const std::vector<std::string>& parameters, User* user, Command** cmd)
{
- Commandtable::iterator n = cmdlist.find(commandname);
+ CommandMap::iterator n = cmdlist.find(commandname);
if (n != cmdlist.end())
{
void CommandParser::RemoveCommand(Command* x)
{
- Commandtable::iterator n = cmdlist.find(x->name);
+ CommandMap::iterator n = cmdlist.find(x->name);
if (n != cmdlist.end() && n->second == x)
cmdlist.erase(n);
}