If WHOIS_IDLE_NO_OPERS is defined, WHOIS command will not show the
authorMatthew Mondor <mmondor@pulsar-zone.net>
Mon, 20 Feb 2006 12:19:46 +0000 (12:19 +0000)
committerMatthew Mondor <mmondor@pulsar-zone.net>
Mon, 20 Feb 2006 12:19:46 +0000 (12:19 +0000)
IRC operators idle time on the server.  Useful for busy admins who get
bothered by PRIVMSG too often by some persistent users monitoring the
idle status.  Now also set as default behavior in config.h.
Thanks for the suggestion of another rubiks-ircd user.

RUBIKS-CHANGES
include/config.h
include/patchlevel.h
src/s_user.c

index 84881ba..3522736 100644 (file)
@@ -1,3 +1,13 @@
+rubiks-ircd-1-0-3
+=================
+
+- If WHOIS_IDLE_NO_OPERS is defined, WHOIS command will not show the
+  IRC operators idle time on the server.  Useful for busy admins who get
+  bothered by PRIVMSG too often by some persistent users monitoring the
+  idle status.  Now also set as default behavior in config.h.
+  Thanks for the suggestion of another rubiks-ircd user.
+
+
 rubiks-ircd-1-0-2
 =================
 
index c2935c9..96b086e 100644 (file)
@@ -18,7 +18,7 @@
  *
  */
 
-/* $Id: config.h,v 1.14 2005/03/17 20:39:02 mmondor Exp $ */
+/* $Id: config.h,v 1.15 2006/02/20 12:19:44 mmondor Exp $ */
 
 #ifndef        __config_include__
 #define        __config_include__
  */
 #define MODULE_HOOK_REMOTEMSG
 
+/* WHOIS_IDLE_NO_OPERS
+ * If defined idle time will not be shown via WHOIS for operators.
+ */
+#define WHOIS_IDLE_NO_OPERS
+
 /* SSL
  * SSL support stolen from fqircd
  */
index e0aff5f..50eaa69 100644 (file)
@@ -16,7 +16,7 @@
  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
 
-/* $Id: patchlevel.h,v 1.3 2005/03/17 20:40:47 mmondor Exp $ */
+/* $Id: patchlevel.h,v 1.4 2006/02/20 12:19:44 mmondor Exp $ */
 
 #ifndef __patchlevel_header__
 #define __patchlevel_header__
@@ -31,7 +31,7 @@
 #define BASENAME "rubiks-ircd"
 #define MAJOR 1
 #define MINOR 0
-#define PATCH 2
+#define PATCH 3
 
 #define PATCHES ""
 
index fc3caf9..ceef20a 100644 (file)
@@ -21,7 +21,7 @@
  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
 
-/* $Id: s_user.c,v 1.11 2005/03/17 20:39:03 mmondor Exp $ */
+/* $Id: s_user.c,v 1.12 2006/02/20 12:19:46 mmondor Exp $ */
 
 #include "struct.h"
 #include "common.h"
@@ -2098,11 +2098,14 @@ m_whois(aClient *cptr, aClient *sptr, int parc, char *parv[])
                        name, buf);
         
         /* don't give away that this oper is on this server if they're hidden! */
+#ifdef WHOIS_IDLE_NO_OPER
+       if (!IsAnOper(acptr) && !IsAdmin(acptr))
+#endif
         if (acptr->user && MyConnect(acptr) && ((sptr == acptr) || 
                 !IsUmodeI(acptr) || (parc > 2) || IsAnOper(sptr)))
             sendto_one(sptr, rpl_str(RPL_WHOISIDLE), me.name, parv[0], name,
                        timeofday - user->last, acptr->firsttime);
-        
+
         continue;
     }
     sendto_one(sptr, rpl_str(RPL_ENDOFWHOIS), me.name, parv[0], parv[1]);