Only allow current opers to WHOX.
authorMichael Poole <mdpoole@troilus.org>
Fri, 1 Jun 2012 01:22:49 +0000 (21:22 -0400)
committerMichael Poole <mdpoole@troilus.org>
Fri, 1 Jun 2012 01:22:49 +0000 (21:22 -0400)
ircd/m_who.c (m_who): Only set WHOSELECT_EXTRA for current opers.

ChangeLog
ircd/m_who.c

index aa3234178f1c20cd547b0fa35fece3bb1525705e..988981e8d3224a3c248f09b1655b24dd808f2165 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2012-05-09  Michael Poole <mdpoole@troilus.org>
+
+       * ircd/m_who.c (m_who): Only set WHOSELECT_EXTRA for current
+       opers.  Because privileges are kept after -o, this would let
+       de-opered clients use WHOX.
+
 2012-05-07  Michael Poole <mdpoole@troilus.org>
 
        * include/client.h (cli_account): New helper macro to return the
index f344e6f2e88587250d73f1e348a1e772c0dfbfb0..49df47580c393399ab9e97ae91a50dced6cc19a6 100644 (file)
@@ -184,10 +184,11 @@ int m_who(struct Client* cptr, struct Client* sptr, int parc, char* parv[])
           continue;
         case 'x':
         case 'X':
-          bitsel |= WHOSELECT_EXTRA;
-          if (HasPriv(sptr, PRIV_WHOX))
-           log_write(LS_WHO, L_INFO, LOG_NOSNOTICE, "%#C WHO %s %s", sptr,
-                     (BadPtr(parv[3]) ? parv[1] : parv[3]), parv[2]);
+          if (HasPriv(sptr, PRIV_WHOX) && IsAnOper(sptr)) {
+              bitsel |= WHOSELECT_EXTRA;
+              log_write(LS_WHO, L_INFO, LOG_NOSNOTICE, "%#C WHO %s %s", sptr,
+                        (BadPtr(parv[3]) ? parv[1] : parv[3]), parv[2]);
+          }
           continue;
         case 'n':
         case 'N':