From e48fdf7342ee8e6be6a638acda31ae8ca4ab7788 Mon Sep 17 00:00:00 2001 From: Matthew Mondor Date: Mon, 20 Feb 2006 12:19:46 +0000 Subject: [PATCH] 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-CHANGES | 10 ++++++++++ include/config.h | 7 ++++++- include/patchlevel.h | 4 ++-- src/s_user.c | 7 +++++-- 4 files changed, 23 insertions(+), 5 deletions(-) diff --git a/RUBIKS-CHANGES b/RUBIKS-CHANGES index 84881ba..3522736 100644 --- a/RUBIKS-CHANGES +++ b/RUBIKS-CHANGES @@ -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 ================= diff --git a/include/config.h b/include/config.h index c2935c9..96b086e 100644 --- a/include/config.h +++ b/include/config.h @@ -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__ @@ -581,6 +581,11 @@ */ #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 */ diff --git a/include/patchlevel.h b/include/patchlevel.h index e0aff5f..50eaa69 100644 --- a/include/patchlevel.h +++ b/include/patchlevel.h @@ -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 "" diff --git a/src/s_user.c b/src/s_user.c index fc3caf9..ceef20a 100644 --- a/src/s_user.c +++ b/src/s_user.c @@ -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]); -- 2.9.0