X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fcommand_parse.cpp;h=0f93e6f53d83e0ad9978d4b215f8f0ff11018a05;hb=cbb95cffac2fe5533bae8bf5dc2ce62fb0f17c2f;hp=995ef694b4ed7c61e62b9e9d45eb6e89b44af650;hpb=6a869d0701bbfe3c7a5e370793adfda4b5b45c65;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/command_parse.cpp b/src/command_parse.cpp index 995ef694b..0f93e6f53 100644 --- a/src/command_parse.cpp +++ b/src/command_parse.cpp @@ -14,7 +14,6 @@ /* $Core */ #include "inspircd.h" -#include "wildcard.h" #include "xline.h" #include "socketengine.h" #include "socket.h" @@ -327,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; @@ -545,7 +553,7 @@ void CommandParser::SetupCommandTable(User* user) dirent* entry = NULL; while (0 != (entry = readdir(library))) { - if (match(entry->d_name, "cmd_*.so")) + if (InspIRCd::Match(entry->d_name, "cmd_*.so")) { if (!user) {