]> jfr.im git - irc/rqf/shadowircd.git/blobdiff - unsupported/m_clearchan.c
Do not check floodcount if user is messaging self.
[irc/rqf/shadowircd.git] / unsupported / m_clearchan.c
index 9d112f288ff6a3eb08daff3181580c69f81c7f39..0a3921f023acbfb37ceab5ca17576f7e236cd6fc 100644 (file)
  *   $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"
@@ -59,8 +58,8 @@ 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))
@@ -84,7 +83,7 @@ mo_clearchan(struct Client *client_p, struct Client *source_p, int parc, const c
        }
 
        /* 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;
@@ -124,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;