X-Git-Url: https://jfr.im/git/irc/rqf/shadowircd.git/blobdiff_plain/212380e3f42f585dc1ea927402252eb943f91f7b..85b8e6497deb6020061522b76afffae6e52573d7:/unsupported/m_clearchan.c diff --git a/unsupported/m_clearchan.c b/unsupported/m_clearchan.c index 505cce8..0a3921f 100644 --- a/unsupported/m_clearchan.c +++ b/unsupported/m_clearchan.c @@ -17,14 +17,13 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * $Id: m_clearchan.c 1425 2006-05-23 16:41:33Z jilles $ + * $Id: m_clearchan.c 3161 2007-01-25 07:23:01Z nenolod $ */ #include "stdinc.h" -#include "tools.h" #include "channel.h" #include "client.h" #include "hash.h" -#include "irc_string.h" +#include "match.h" #include "ircd.h" #include "numeric.h" #include "s_user.h" @@ -46,7 +45,7 @@ struct Message clearchan_msgtab = { mapi_clist_av1 clearchan_clist[] = { &clearchan_msgtab, NULL }; -DECLARE_MODULE_AV1(clearchan, NULL, NULL, clearchan_clist, NULL, NULL, "$Revision: 1425 $"); +DECLARE_MODULE_AV1(clearchan, NULL, NULL, clearchan_clist, NULL, NULL, "$Revision: 3161 $"); /* ** mo_clearchan @@ -59,13 +58,13 @@ mo_clearchan(struct Client *client_p, struct Client *source_p, int parc, const c struct Channel *chptr; struct membership *msptr; struct Client *target_p; - dlink_node *ptr; - dlink_node *next_ptr; + rb_dlink_node *ptr; + rb_dlink_node *next_ptr; /* admins only */ if(!IsOperAdmin(source_p)) { - sendto_one(source_p, ":%s NOTICE %s :You have no A flag", me.name, parv[0]); + sendto_one_notice(source_p, ":You have no A flag"); return 0; } @@ -79,13 +78,12 @@ mo_clearchan(struct Client *client_p, struct Client *source_p, int parc, const c if(IsMember(source_p, chptr)) { - sendto_one(source_p, ":%s NOTICE %s :*** Please part %s before using CLEARCHAN", - me.name, source_p->name, parv[1]); + sendto_one_notice(source_p, ":*** Please part %s before using CLEARCHAN", parv[1]); return 0; } /* quickly make everyone a peon.. */ - DLINK_FOREACH(ptr, chptr->members.head) + RB_DLINK_FOREACH(ptr, chptr->members.head) { msptr = ptr->data; msptr->flags &= ~CHFL_CHANOP | CHFL_VOICE; @@ -125,7 +123,7 @@ mo_clearchan(struct Client *client_p, struct Client *source_p, int parc, const c chptr->mode.mode = MODE_SECRET | MODE_TOPICLIMIT | MODE_INVITEONLY | MODE_NOPRIVMSGS; chptr->mode.key[0] = '\0'; - DLINK_FOREACH_SAFE(ptr, next_ptr, chptr->members.head) + RB_DLINK_FOREACH_SAFE(ptr, next_ptr, chptr->members.head) { msptr = ptr->data; target_p = msptr->client_p;