]> 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 cdac83a24d8611d49168f655bcd45f94b7db334f..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;
@@ -565,8 +574,6 @@ void CommandParser::SetupCommandTable(User* user)
                                        }
                                }
                        }
-                       else
-                               printf("NOT loading %s, not a cmd\n", entry->d_name);
                }
                closedir(library);
                if (!user)