]> jfr.im git - solanum.git/blobdiff - modules/m_knock.c
whois: Fix UID leak.
[solanum.git] / modules / m_knock.c
index 9c39e35b91c16c84d556a479fb64bc5b0d1d1609..e85cce3987f8d2df5ebaa4379e00ef5c5a6eec63 100644 (file)
@@ -79,13 +79,6 @@ m_knock(struct Client *client_p, struct Client *source_p, int parc, const char *
        if((p = strchr(name, ',')))
                *p = '\0';
 
-       if(!IsChannelName(name))
-       {
-               sendto_one_numeric(source_p, ERR_NOSUCHCHANNEL,
-                                  form_str(ERR_NOSUCHCHANNEL), name);
-               return 0;
-       }
-
        if((chptr = find_channel(name)) == NULL)
        {
                sendto_one_numeric(source_p, ERR_NOSUCHCHANNEL,
@@ -122,8 +115,8 @@ m_knock(struct Client *client_p, struct Client *source_p, int parc, const char *
        if(MyClient(source_p))
        {
                /* don't allow a knock if the user is banned */
-               if(is_banned(chptr, source_p, NULL, NULL, NULL) == CHFL_BAN ||
-                               is_quieted(chptr, source_p, NULL, NULL, NULL) == CHFL_BAN)
+               if(is_banned(chptr, source_p, NULL, NULL, NULL, NULL) == CHFL_BAN ||
+                       is_quieted(chptr, source_p, NULL, NULL, NULL) == CHFL_BAN)
                {
                        sendto_one_numeric(source_p, ERR_CANNOTSENDTOCHAN,
                                           form_str(ERR_CANNOTSENDTOCHAN), name);