summaryrefslogtreecommitdiff
path: root/src/mode.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mode.cpp')
-rw-r--r--src/mode.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/mode.cpp b/src/mode.cpp
index 845473c95..069f2ea48 100644
--- a/src/mode.cpp
+++ b/src/mode.cpp
@@ -339,6 +339,12 @@ ModeAction ModeParser::TryMode(User* user, User* targetuser, Channel* chan, bool
return MODEACTION_DENY;
}
+ if (mh->GetTranslateType() == TR_NICK && !ServerInstance->FindNick(parameter))
+ {
+ user->WriteNumeric(ERR_NOSUCHNICK, "%s %s :No such nick/channel", user->nick.c_str(), parameter.c_str());
+ return MODEACTION_DENY;
+ }
+
/* Call the handler for the mode */
ModeAction ma = mh->OnModeChange(user, targetuser, chan, parameter, adding);