X-Git-Url: https://jfr.im/git/irc/rqf/shadowircd.git/blobdiff_plain/212380e3f42f585dc1ea927402252eb943f91f7b..f0a889b602a9de1ae15a6acb50dcb94008df3494:/modules/m_knock.c diff --git a/modules/m_knock.c b/modules/m_knock.c index ed7c359..fce9469 100644 --- a/modules/m_knock.c +++ b/modules/m_knock.c @@ -20,12 +20,11 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA * - * $Id: m_knock.c 752 2006-02-11 20:55:03Z jilles $ + * $Id: m_knock.c 3570 2007-09-09 19:19:23Z jilles $ */ #include "stdinc.h" #include "sprintf_irc.h" -#include "tools.h" #include "channel.h" #include "client.h" #include "hash.h" @@ -47,7 +46,7 @@ struct Message knock_msgtab = { }; mapi_clist_av1 knock_clist[] = { &knock_msgtab, NULL }; -DECLARE_MODULE_AV1(knock, NULL, NULL, knock_clist, NULL, NULL, "$Revision: 752 $"); +DECLARE_MODULE_AV1(knock, NULL, NULL, knock_clist, NULL, NULL, "$Revision: 3570 $"); /* m_knock * parv[0] = sender prefix @@ -106,7 +105,7 @@ m_knock(struct Client *client_p, struct Client *source_p, int parc, const char * if(!((chptr->mode.mode & MODE_INVITEONLY) || (*chptr->mode.key) || (chptr->mode.limit && - dlink_list_length(&chptr->members) >= (unsigned long)chptr->mode.limit))) + rb_dlink_list_length(&chptr->members) >= (unsigned long)chptr->mode.limit))) { sendto_one_numeric(source_p, ERR_CHANOPEN, form_str(ERR_CHANOPEN), name); @@ -161,7 +160,8 @@ m_knock(struct Client *client_p, struct Client *source_p, int parc, const char * chptr->last_knock = CurrentTime; if(ConfigChannel.use_knock) - sendto_channel_local(ONLY_CHANOPS, chptr, form_str(RPL_KNOCK), + sendto_channel_local(chptr->mode.mode & MODE_FREEINVITE ? ALL_MEMBERS : ONLY_CHANOPS, + chptr, form_str(RPL_KNOCK), me.name, name, name, source_p->name, source_p->username, source_p->host);