Clean up sendwallto_group_butone() macro usage.
authorMichael Poole <mdpoole@troilus.org>
Tue, 30 Oct 2007 01:14:50 +0000 (01:14 +0000)
committerMichael Poole <mdpoole@troilus.org>
Tue, 30 Oct 2007 01:14:50 +0000 (01:14 +0000)
git-svn-id: file:///home/klmitch/undernet-ircu/undernet-ircu-svn/ircu2/branches/u2_10_12_branch@1835 c9e4aea6-c8fd-4c43-8297-357d70d61c8c

ChangeLog
ircd/send.c

index 303beadfbabb406a214497b9a42742dbb92821c7..dd54d3533532d50ef1aabd593763c3e51d5d9e49 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2007-08-20  Michael Poole <mdpoole@troilus.org>
+
+       * ircd/send.c (sendwallto_group_butone): Move a feature_bool()
+       call out of a loop.  Convert HasFlag() uses to appropriate macros
+       from client.h.
+
 2007-08-20  Michael Poole <mdpoole@troilus.org>
 
        * ircd/ircd_string.c (ircd_aton_ip4): Allow a sequence of *.* at
index 728edaa32a216866085c7ced6f8407e8da590389..b443e30908432d5ffe410471af420f132bcd0b2d 100644 (file)
@@ -669,6 +669,7 @@ void sendwallto_group_butone(struct Client *from, int type, struct Client *one,
   struct DLink *lp;
   char *prefix=NULL;
   char *tok=NULL;
+  int his_wallops;
   int i;
 
   vd.vd_format = pattern;
@@ -695,15 +696,15 @@ void sendwallto_group_butone(struct Client *from, int type, struct Client *one,
   va_end(vd.vd_args);
 
   /* send buffer along! */
+  his_wallops = feature_bool(FEAT_HIS_WALLOPS);
   for (i = 0; i <= HighestFd; i++)
   {
     if (!(cptr = LocalClientArray[i]) ||
        (cli_fd(cli_from(cptr)) < 0) ||
-       (type == WALL_DESYNCH && !HasFlag(cptr, FLAG_DEBUG)) ||
+       (type == WALL_DESYNCH && !SendDebug(cptr)) ||
        (type == WALL_WALLOPS &&
-         (!HasFlag(cptr, FLAG_WALLOP) || (feature_bool(FEAT_HIS_WALLOPS) &&
-                                          !IsAnOper(cptr)))) ||
-        (type == WALL_WALLUSERS && !HasFlag(cptr, FLAG_WALLOP)))
+         (!SendWallops(cptr) || (his_wallops && !IsAnOper(cptr)))) ||
+        (type == WALL_WALLUSERS && !SendWallops(cptr)))
       continue; /* skip it */
     send_buffer(cptr, mb, 1);
   }