Committer  : entrope
CVSROOT    : /cvsroot/undernet-ircu
Module     : ircu2.10
Branch tags: u2_10_12_branch
Commit time: 2005-10-01 03:45:29 UTC

Modified files:
  Tag: u2_10_12_branch
     ChangeLog ircd/m_who.c

Log message:

Properly match against accounts when searching users.

---------------------- diff included ----------------------
Index: ircu2.10/ChangeLog
diff -u ircu2.10/ChangeLog:1.710.2.1 ircu2.10/ChangeLog:1.710.2.2
--- ircu2.10/ChangeLog:1.710.2.1        Fri Sep 30 16:33:55 2005
+++ ircu2.10/ChangeLog  Fri Sep 30 20:45:19 2005
@@ -1,5 +1,10 @@
 2005-09-30  Michael Poole <[EMAIL PROTECTED]>
 
+       * ircd/m_who.c (m_who): Handle matchsel & WHO_FIELD_ACC when
+       matching users.
+
+2005-09-30  Michael Poole <[EMAIL PROTECTED]>
+
        * include/patchlevel.h: Update for release.
 
 2005-09-28  Michael Poole <[EMAIL PROTECTED]>
Index: ircu2.10/ircd/m_who.c
diff -u ircu2.10/ircd/m_who.c:1.22 ircu2.10/ircd/m_who.c:1.22.2.1
--- ircu2.10/ircd/m_who.c:1.22  Fri Sep 23 19:57:20 2005
+++ ircu2.10/ircd/m_who.c       Fri Sep 30 20:45:19 2005
@@ -20,7 +20,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: m_who.c,v 1.22 2005/09/24 02:57:20 entrope Exp $
+ * $Id: m_who.c,v 1.22.2.1 2005/10/01 03:45:19 entrope Exp $
  */
 
 /*
@@ -376,6 +376,8 @@
         matchsel &= ~WHO_FIELD_UID;
       if ((minlen > HOSTLEN) || !(cset & NTL_IRCHN))
         matchsel &= ~WHO_FIELD_HOS;
+      if ((minlen > ACCOUNTLEN))
+        matchsel &= ~WHO_FIELD_ACC;
     }
 
     /* First of all loop through the clients in common channels */
@@ -409,7 +411,9 @@
               || matchexec(cli_info(acptr), mymask, minlen))
               && ((!(matchsel & WHO_FIELD_NIP))
              || (HasHiddenHost(acptr) && !IsAnOper(sptr))
-              || !ipmask_check(&cli_ip(acptr), &imask, ibits)))
+              || !ipmask_check(&cli_ip(acptr), &imask, ibits))
+              && ((!(matchsel & WHO_FIELD_ACC))
+              || matchexec(cli_user(acptr)->account, mymask, minlen)))
             continue;
           if (!SHOW_MORE(sptr, counter))
             break;
@@ -445,7 +449,9 @@
             || matchexec(cli_info(acptr), mymask, minlen))
             && ((!(matchsel & WHO_FIELD_NIP))
            || (HasHiddenHost(acptr) && !IsAnOper(sptr))
-            || !ipmask_check(&cli_ip(acptr), &imask, ibits)))
+            || !ipmask_check(&cli_ip(acptr), &imask, ibits))
+            && ((!(matchsel & WHO_FIELD_ACC))
+            || matchexec(cli_user(acptr)->account, mymask, minlen)))
           continue;
         if (!SHOW_MORE(sptr, counter))
           break;
----------------------- End of diff -----------------------
_______________________________________________
Patches mailing list
[email protected]
http://undernet.sbg.org/mailman/listinfo/patches

Reply via email to