]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_abbreviation.cpp
Get rid of irc::sockets::satoap().
[user/henk/code/inspircd.git] / src / modules / m_abbreviation.cpp
index f69d26749727a7700fb4c5a08c00fbdb676d877b..2a38bd3a674f16a57b2ae4f6a04f74d88731c10b 100644 (file)
@@ -22,7 +22,7 @@
 class ModuleAbbreviation : public Module
 {
  public:
-       void Prioritize()
+       void Prioritize() CXX11_OVERRIDE
        {
                ServerInstance->Modules->SetPriority(this, I_OnPreCommand, PRIORITY_FIRST);
        }
@@ -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;
                }