diff options
author | attilamolnar <attilamolnar@hush.com> | 2012-11-19 03:37:59 +0100 |
---|---|---|
committer | attilamolnar <attilamolnar@hush.com> | 2012-12-15 19:47:40 +0100 |
commit | e3e3a35899931d98e76023464f9b077b09ba828d (patch) | |
tree | 5a4dbe8907a2bd25e1ac5a72ca5a182efdae7041 /src/modules/m_swhois.cpp | |
parent | 71d53e4883cdb83b50f43cd934ac9b4cd2b95383 (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/modules/m_swhois.cpp')
-rw-r--r-- | src/modules/m_swhois.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/modules/m_swhois.cpp b/src/modules/m_swhois.cpp index 2e5abe95a..742781747 100644 --- a/src/modules/m_swhois.cpp +++ b/src/modules/m_swhois.cpp @@ -43,7 +43,7 @@ class CommandSwhois : public Command { User* dest = ServerInstance->FindNick(parameters[0]); - if (!dest) + if ((!dest) || (IS_SERVER(dest))) // allow setting swhois using SWHOIS before reg { user->WriteNumeric(ERR_NOSUCHNICK, "%s %s :No such nick/channel", user->nick.c_str(), parameters[0].c_str()); return CMD_FAILURE; |