summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2009-10-05 20:03:28 +0000
committerdanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2009-10-05 20:03:28 +0000
commitb4a39a0cf7f27c62cb4a262bafde405e917e2d02 (patch)
treee322a25a336282c7947b4c786148400d4afa57f4
parent9336468f5bfa60318cb57db5126047147b7a21cb (diff)
Deny TR_NICK mode changes with an invalid nick parameter
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11800 e03df62e-2008-0410-955e-edbf42e46eb7
-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);