diff options
Diffstat (limited to 'src/modules/m_remove.cpp')
-rw-r--r-- | src/modules/m_remove.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/modules/m_remove.cpp b/src/modules/m_remove.cpp index ffb8f8e55..86f50ad62 100644 --- a/src/modules/m_remove.cpp +++ b/src/modules/m_remove.cpp @@ -69,9 +69,9 @@ class RemoveBase : public Command channel = ServerInstance->FindChan(channame); /* Fix by brain - someone needs to learn to validate their input! */ - if (!target || !channel) + if ((!target) || (target->registered != REG_ALL) || (!channel)) { - user->WriteNumeric(ERR_NOSUCHNICK, "%s %s :No such nick/channel", user->nick.c_str(), !target ? username.c_str() : channame.c_str()); + user->WriteNumeric(ERR_NOSUCHNICK, "%s %s :No such nick/channel", user->nick.c_str(), !channel ? channame.c_str() : username.c_str()); return CMD_FAILURE; } |