Support showing join-delayed users in /WHO output.
[ircu2.10.12-pk.git] / ircd / m_who.c
index d2a4411ab6b7494a7bbafb5579e98100f48d51de..6b277f1bcd41d5c2e06cfd82a5154dc84c88b238 100644 (file)
@@ -174,6 +174,10 @@ int m_who(struct Client* cptr, struct Client* sptr, int parc, char* parv[])
     while (((ch = *(p++))) && (ch != '%') && (ch != ','))
       switch (ch)
       {
+        case 'd':
+        case 'D':
+          bitsel |= WHOSELECT_DELAY;
+          continue;
         case 'o':
         case 'O':
           bitsel |= WHOSELECT_OPER;
@@ -322,7 +326,10 @@ int m_who(struct Client* cptr, struct Client* sptr, int parc, char* parv[])
             acptr = member->user;
             if ((bitsel & WHOSELECT_OPER) && !SeeOper(sptr,acptr))
               continue;
-            if ((acptr != sptr) && (member->status & (CHFL_ZOMBIE | CHFL_DELAYED)))
+            if ((acptr != sptr)
+                && ((member->status & CHFL_ZOMBIE)
+                    || ((member->status & CHFL_DELAYED)
+                        && !(bitsel & WHOSELECT_DELAY))))
               continue;
             if (!(isthere || (SEE_USER(sptr, acptr, bitsel))))
               continue;