Author: Alex Badea <vampire@p16.pub.ro>
authorAlex Badea <vampire@p16.pub.ro>
Fri, 19 Apr 2002 12:20:23 +0000 (12:20 +0000)
committerAlex Badea <vampire@p16.pub.ro>
Fri, 19 Apr 2002 12:20:23 +0000 (12:20 +0000)
Log message:

Fixed /who server.name for non-opers (matchsel default included
WHO_FIELD_SER, *sigh*)

(pullup from u2_10_11 branch)

git-svn-id: file:///home/klmitch/undernet-ircu/undernet-ircu-svn/ircu2/trunk@749 c9e4aea6-c8fd-4c43-8297-357d70d61c8c

ChangeLog
ircd/m_who.c

index 5e7af0bc28143fb0e780e7f4d1c9ca9d5ac6211a..6772e2049d0edf0cdc5588571562b55bc59d5e65 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2002-04-19  Alex Badea  <vampire@p16.pub.ro>
+
+       * ircd/m_who.c (m_who): disallow non-opers to /who server.name
+
 2002-04-18  Alex Badea  <vampire@p16.pub.ro>
 
        * ircd/s_err.c (RPL_STATSILINE): connection classes are now
index 271946b748279209f256abed6d9e1d6188cabf26..cb8bf65e2680623580b3417b669d4b52af18a74f 100644 (file)
@@ -204,10 +204,7 @@ int m_who(struct Client* cptr, struct Client* sptr, int parc, char* parv[])
           continue;
         case 's':
         case 'S':
-#ifdef HEAD_IN_SAND_WHO_SERVERNAME
-          if (IsAnOper(sptr))
-#endif
-            matchsel |= WHO_FIELD_SER;
+          matchsel |= WHO_FIELD_SER;
           continue;
         case 'r':
         case 'R':
@@ -253,10 +250,7 @@ int m_who(struct Client* cptr, struct Client* sptr, int parc, char* parv[])
             break;
           case 's':
           case 'S':
-#ifdef HEAD_IN_SAND_WHO_SERVERNAME
-            if (IsAnOper(sptr))
-#endif
-              fields |= WHO_FIELD_SER;
+            fields |= WHO_FIELD_SER;
             break;
           case 't':
           case 'T':
@@ -279,6 +273,11 @@ int m_who(struct Client* cptr, struct Client* sptr, int parc, char* parv[])
   if (!fields)
     counter = 7;
 
+#ifdef HEAD_IN_SAND_WHO_SERVERNAME
+  if (!IsAnOper(sptr))
+    matchsel &= ~WHO_FIELD_SER;
+#endif
+
   if (qrt && (fields & WHO_FIELD_QTY))
   {
     p = qrt;