X-Git-Url: https://jfr.im/git/solanum.git/blobdiff_plain/cbe4e1ba31fb4580a6367a2c89d43f88162ea13b..b2c208be091670e3c5259eba77187bae6ac6eece:/modules/m_knock.c diff --git a/modules/m_knock.c b/modules/m_knock.c index 2c786e09..e85cce39 100644 --- a/modules/m_knock.c +++ b/modules/m_knock.c @@ -27,7 +27,7 @@ #include "channel.h" #include "client.h" #include "hash.h" -#include "irc_string.h" +#include "match.h" #include "ircd.h" #include "numeric.h" #include "send.h" @@ -48,7 +48,6 @@ mapi_clist_av1 knock_clist[] = { &knock_msgtab, NULL }; DECLARE_MODULE_AV1(knock, NULL, NULL, knock_clist, NULL, NULL, "$Revision: 3570 $"); /* m_knock - * parv[0] = sender prefix * parv[1] = channel * * The KNOCK command has the following syntax: @@ -80,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, @@ -123,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);