]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_remove.cpp
Fix m_ssl_gnutls and perhaps some other things on Windows by recognizing WSAEWOULDBLOCK
[user/henk/code/inspircd.git] / src / modules / m_remove.cpp
index ffb8f8e551f7ac0c11b792b17dc84a4580e460f6..86f50ad625d9ad351dda7687f9e982c6063aabab 100644 (file)
@@ -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;
                }