From 085a8a34cb0b1bd97bba76fff15820fb57aa50e4 Mon Sep 17 00:00:00 2001 From: Attila Molnar Date: Fri, 13 Jun 2014 15:40:03 +0200 Subject: Add CommandParser::GetCommands() and typedef CommandMap and use it instead of directly accessing cmdlist --- src/modules/m_abbreviation.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/modules/m_abbreviation.cpp') diff --git a/src/modules/m_abbreviation.cpp b/src/modules/m_abbreviation.cpp index f69d26749..a7bf8ceee 100644 --- a/src/modules/m_abbreviation.cpp +++ b/src/modules/m_abbreviation.cpp @@ -42,7 +42,8 @@ class ModuleAbbreviation : public Module size_t clen = command.length() - 1; std::string foundcommand, matchlist; bool foundmatch = false; - for (Commandtable::iterator n = ServerInstance->Parser->cmdlist.begin(); n != ServerInstance->Parser->cmdlist.end(); ++n) + const CommandParser::CommandMap& commands = ServerInstance->Parser->GetCommands(); + for (CommandParser::CommandMap::const_iterator n = commands.begin(); n != commands.end(); ++n) { if (!command.compare(0, clen, n->first, 0, clen)) { -- cgit v1.3.1-10-gc9f91