diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/command_parse.cpp | 11 | ||||
-rw-r--r-- | src/configreader.cpp | 1 |
2 files changed, 11 insertions, 1 deletions
diff --git a/src/command_parse.cpp b/src/command_parse.cpp index 612337ccf..0f93e6f53 100644 --- a/src/command_parse.cpp +++ b/src/command_parse.cpp @@ -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; diff --git a/src/configreader.cpp b/src/configreader.cpp index 424f3ad68..9ec8aa367 100644 --- a/src/configreader.cpp +++ b/src/configreader.cpp @@ -843,6 +843,7 @@ void ServerConfig::Read(bool bail, User* user) {"disabled", "commands", "", new ValueContainerChar (this->DisabledCommands), DT_CHARPTR, NoValidation}, {"disabled", "usermodes", "", new ValueContainerChar (disabledumodes), DT_CHARPTR, ValidateDisabledUModes}, {"disabled", "chanmodes", "", new ValueContainerChar (disabledcmodes), DT_CHARPTR, ValidateDisabledCModes}, + {"disabled", "fakenonexistant", "0", new ValueContainerBool (&this->DisabledDontExist), DT_BOOLEAN, NoValidation}, {"security", "userstats", "", new ValueContainerChar (this->UserStats), DT_CHARPTR, NoValidation}, {"security", "customversion","", new ValueContainerChar (this->CustomVersion), DT_CHARPTR, NoValidation}, {"security", "hidesplits", "0", new ValueContainerBool (&this->HideSplits), DT_BOOLEAN, NoValidation}, |