Shows the users AC if requested in the /who parameters (%a)

Index: ChangeLog
===================================================================
RCS file: /home/coder-com/cvs/ircu2.10/ChangeLog,v
retrieving revision 1.290.2.123.4.4
diff -b -u -d -r1.290.2.123.4.4 ChangeLog
--- ChangeLog   2002/09/06 17:34:46     1.290.2.123.4.4
+++ ChangeLog   2002/09/13 00:28:41
@@ -1,3 +1,12 @@
+2002-09-13  Jochen Meesters <[EMAIL PROTECTED]>
+
+       * include/whocmds.h: created WHO_FIELD_ACC
+
+       * ircd/whcmds.c: added WHO_FIELD_ACC support
+
+       * ircd/m_who.c: added WHO_FIELD_ACC, showing the users ACCOUNT login
+       if %a is used in the /who request
+
 2002-09-06  Kevin L Mitchell  <[EMAIL PROTECTED]>

        * ircd/channel.c (modebuf_flush_int): somehow missed this--set
Index: include/whocmds.h
===================================================================
RCS file: /home/coder-com/cvs/ircu2.10/include/whocmds.h,v
retrieving revision 1.6
diff -b -u -d -r1.6 whocmds.h
--- include/whocmds.h   2001/06/28 21:40:56     1.6
+++ include/whocmds.h   2002/09/13 00:28:41Index: ircd/m_who.c
===================================================================
RCS file: /home/coder-com/cvs/ircu2.10/ircd/m_who.c,v
retrieving revision 1.10.2.7
diff -b -u -d -r1.10.2.7 m_who.c
--- ircd/m_who.c        2002/07/17 22:55:41     1.10.2.7
+++ ircd/m_who.c        2002/09/13 00:28:43
@@ -210,6 +210,10 @@
         case 'R':
           matchsel |= WHO_FIELD_REN;
           continue;
+        case 'a':
+        case 'A':
+          matchsel |= WHO_FIELD_ACC;
+          continue;
       }
     if (ch == '%')
       while ((ch = *p++) && (ch != ','))
@@ -259,6 +263,10 @@
           case 'u':
           case 'U':
             fields |= WHO_FIELD_UID;
+            break;Index: ircd/whocmds.c
===================================================================
RCS file: /home/coder-com/cvs/ircu2.10/ircd/whocmds.c,v
retrieving revision 1.12.2.5
diff -b -u -d -r1.12.2.5 whocmds.c
--- ircd/whocmds.c      2002/07/17 22:55:41     1.12.2.5
+++ ircd/whocmds.c      2002/09/13 00:28:43
@@ -230,6 +230,13 @@
     while ((*p2) && (*(p1++) = *(p2++)));
   }

+  if (fields & WHO_FIELD_ACC)
+  {
+    char *p2 = cli_user(acptr)->account;
+    *(p1++) = ' ';
+    while ((*p2) && (*(p1++) = *(p2++)));
+  }
+
   /* The first char will always be an useless blank and we
      need to terminate buf1 */
   *p1 = '\0';

+          case 'a':
+          case 'A':
+            fields |= WHO_FIELD_ACC;
             break;
           default:
             break;

@@ -36,6 +36,7 @@
 #define WHO_FIELD_DIS 256
 #define WHO_FIELD_REN 512
 #define WHO_FIELD_IDL 1024
+#define WHO_FIELD_ACC 2048

 #define WHO_FIELD_DEF ( WHO_FIELD_NIC | WHO_FIELD_UID | WHO_FIELD_HOS | 
WHO_FIELD_SER )

Reply via email to