diff options
author | Attila Molnar <attilamolnar@hush.com> | 2014-04-07 13:40:51 +0200 |
---|---|---|
committer | Attila Molnar <attilamolnar@hush.com> | 2014-04-07 13:40:51 +0200 |
commit | f71e6bf9cb41811f18864f5d4eecb26e29d03f25 (patch) | |
tree | 88586e73f7ff864081b8831a88637680267b7201 /src/modules/m_samode.cpp | |
parent | ce78080782c261aed2c0314bc8c66babc1369be2 (diff) | |
parent | 493ff75f1f89a7ede2800eff0368740fbaf02aa4 (diff) |
Merge insp20
Diffstat (limited to 'src/modules/m_samode.cpp')
-rw-r--r-- | src/modules/m_samode.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/modules/m_samode.cpp b/src/modules/m_samode.cpp index 129ad3f7b..14f79aaf7 100644 --- a/src/modules/m_samode.cpp +++ b/src/modules/m_samode.cpp @@ -37,6 +37,15 @@ class CommandSamode : public Command CmdResult Handle (const std::vector<std::string>& parameters, User *user) { + if (parameters[0].c_str()[0] != '#') + { + User* target = ServerInstance->FindNickOnly(parameters[0]); + if ((!target) || (target->registered != REG_ALL)) + { + user->WriteNumeric(ERR_NOSUCHNICK, "%s %s :No such nick/channel", user->nick.c_str(), parameters[0].c_str()); + return CMD_FAILURE; + } + } User* target = ServerInstance->FindNick(parameters[0]); if ((target) && (target != user)) { |