diff options
Diffstat (limited to 'src/modules/m_abbreviation.cpp')
-rw-r--r-- | src/modules/m_abbreviation.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/modules/m_abbreviation.cpp b/src/modules/m_abbreviation.cpp index f69d26749..85709080f 100644 --- a/src/modules/m_abbreviation.cpp +++ b/src/modules/m_abbreviation.cpp @@ -42,13 +42,14 @@ 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)) { if (matchlist.length() > 450) { - user->WriteNumeric(420, ":Ambiguous abbreviation and too many possible matches."); + user->WriteNumeric(420, "Ambiguous abbreviation and too many possible matches."); return MOD_RES_DENY; } @@ -66,7 +67,7 @@ class ModuleAbbreviation : public Module /* Ambiguous command, list the matches */ if (!matchlist.empty()) { - user->WriteNumeric(420, ":Ambiguous abbreviation, posssible matches: %s%s", foundcommand.c_str(), matchlist.c_str()); + user->WriteNumeric(420, InspIRCd::Format("Ambiguous abbreviation, possible matches: %s%s", foundcommand.c_str(), matchlist.c_str())); return MOD_RES_DENY; } |