+ /* Look for any command that starts with the same characters, if it does, replace the command string with it */
+ size_t clen = command.length() - 1;
+ std::string foundcommand, matchlist;
+ bool foundmatch = false;
+ 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.");
+ return MOD_RES_DENY;
+ }