+ return MOD_RES_PASSTHRU;
+
+ /* 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;
+ }
+
+ if (!foundmatch)
+ {
+ /* Found the command */
+ foundcommand = n->first;
+ foundmatch = true;
+ }
+ else
+ matchlist.append(" ").append(n->first);
+ }
+ }
+
+ /* Ambiguous command, list the matches */
+ if (!matchlist.empty())
+ {
+ user->WriteNumeric(420, ":Ambiguous abbreviation, posssible matches: %s%s", foundcommand.c_str(), matchlist.c_str());
+ return MOD_RES_DENY;
+ }