]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/command_parse.cpp
As we have an enum for type, why not ..use it?
[user/henk/code/inspircd.git] / src / command_parse.cpp
index 4063edf385246e0f67387a17a9bfdf3c63158b00..0f93e6f53d83e0ad9978d4b215f8f0ff11018a05 100644 (file)
@@ -326,7 +326,16 @@ bool CommandParser::ProcessCommand(User *user, std::string &cmd)
        if ((user->registered == REG_ALL) && (!IS_OPER(user)) && (cm->second->IsDisabled()))
        {
                /* command is disabled! */
-               user->WriteNumeric(ERR_UNKNOWNCOMMAND, "%s %s :This command has been disabled.",user->nick.c_str(),command.c_str());
+               if (ServerInstance->Config->DisabledDontExist)
+               {
+                       user->WriteNumeric(ERR_UNKNOWNCOMMAND, "%s %s :Unknown command",user->nick.c_str(),command.c_str());
+               }
+               else
+               {
+                       user->WriteNumeric(ERR_UNKNOWNCOMMAND, "%s %s :This command has been disabled.",
+                                                                               user->nick.c_str(), command.c_str());
+               }
+
                ServerInstance->SNO->WriteToSnoMask('d', "%s denied for %s (%s@%s)",
                                command.c_str(), user->nick.c_str(), user->ident.c_str(), user->host.c_str());
                return do_more;
@@ -544,7 +553,7 @@ void CommandParser::SetupCommandTable(User* user)
                dirent* entry = NULL;
                while (0 != (entry = readdir(library)))
                {
-                       if (InspIRCd::Match(entry->d_name, "cmd_*.so", NULL))
+                       if (InspIRCd::Match(entry->d_name, "cmd_*.so"))
                        {
                                if (!user)
                                {