summaryrefslogtreecommitdiff
path: root/src/mode.cpp
diff options
context:
space:
mode:
authorattilamolnar <attilamolnar@hush.com>2012-11-19 03:37:59 +0100
committerattilamolnar <attilamolnar@hush.com>2012-12-15 19:47:40 +0100
commite3e3a35899931d98e76023464f9b077b09ba828d (patch)
tree5a4dbe8907a2bd25e1ac5a72ca5a182efdae7041 /src/mode.cpp
parent71d53e4883cdb83b50f43cd934ac9b4cd2b95383 (diff)
Add IS_SERVER() and REG_ALL checks to (mostly oper only) commands taking a target nickname
If a SID was passed as the target user parameter or when it's an unregistered user reply with the "no such nick" (or the moral equivalent) message
Diffstat (limited to 'src/mode.cpp')
-rw-r--r--src/mode.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mode.cpp b/src/mode.cpp
index 35f64ce00..e2b0c2f68 100644
--- a/src/mode.cpp
+++ b/src/mode.cpp
@@ -387,7 +387,7 @@ void ModeParser::Process(const std::vector<std::string>& parameters, User *user,
LastParseParams.clear();
LastParseTranslate.clear();
- if (!targetchannel && !targetuser)
+ if ((!targetchannel) && ((!targetuser) || (IS_SERVER(targetuser))))
{
user->WriteNumeric(ERR_NOSUCHNICK, "%s %s :No such nick/channel",user->nick.c_str(),target.c_str());
return;