Index: include/client.h
===================================================================
RCS file: /cvsroot/ircd-hybrid-6/include/client.h,v
retrieving revision 1.60
diff -c -r1.60 client.h
*** include/client.h	4 Dec 2001 06:40:30 -0000	1.60
--- include/client.h	11 Feb 2002 02:58:26 -0000
***************
*** 337,342 ****
--- 337,343 ----
  #define FLAGS_INVISIBLE    0x0400 /* makes user invisible */
  #define FLAGS_BOTS         0x0800 /* shows bots */
  #define FLAGS_EXTERNAL     0x1000 /* show servers introduced */
+ #define FLAGS_HIDDENOPER   0x10000
  /* user information flags, only settable by remote mode or local oper */
  #define FLAGS_OPER         0x4000 /* Operator */
  #define FLAGS_LOCOP        0x8000 /* Local operator -- SRB */
***************
*** 387,393 ****
  #define ALL_UMODES   (SEND_UMODES | FLAGS_SERVNOTICE | FLAGS_CCONN | \
                        FLAGS_REJ | FLAGS_SKILL | FLAGS_FULL | FLAGS_SPY | \
                        FLAGS_NCHANGE | FLAGS_OPERWALL | FLAGS_DEBUG | \
!                       FLAGS_BOTS | FLAGS_EXTERNAL | FLAGS_LOCOP )
  
  #ifndef OPER_UMODES
  #define OPER_UMODES  (FLAGS_OPER | FLAGS_WALLOP | FLAGS_SERVNOTICE | \
--- 388,395 ----
  #define ALL_UMODES   (SEND_UMODES | FLAGS_SERVNOTICE | FLAGS_CCONN | \
                        FLAGS_REJ | FLAGS_SKILL | FLAGS_FULL | FLAGS_SPY | \
                        FLAGS_NCHANGE | FLAGS_OPERWALL | FLAGS_DEBUG | \
!                       FLAGS_BOTS | FLAGS_EXTERNAL | FLAGS_LOCOP | \
! 					  FLAGS_HIDDENOPER)
  
  #ifndef OPER_UMODES
  #define OPER_UMODES  (FLAGS_OPER | FLAGS_WALLOP | FLAGS_SERVNOTICE | \
***************
*** 441,447 ****
  #define SendDebugNotice(x)      ((x)->umodes & FLAGS_DEBUG)
  #define SendNickChange(x)       ((x)->umodes & FLAGS_NCHANGE)
  #define SetWallops(x)           ((x)->umodes |= FLAGS_WALLOP)
! 
  
  #ifdef REJECT_HOLD
  #define IsRejectHeld(x)         ((x)->flags & FLAGS_REJECT_HOLD)
--- 443,449 ----
  #define SendDebugNotice(x)      ((x)->umodes & FLAGS_DEBUG)
  #define SendNickChange(x)       ((x)->umodes & FLAGS_NCHANGE)
  #define SetWallops(x)           ((x)->umodes |= FLAGS_WALLOP)
! #define IsHiddenOper(x)			((x)->umodes & FLAGS_HIDDENOPER)
  
  #ifdef REJECT_HOLD
  #define IsRejectHeld(x)         ((x)->flags & FLAGS_REJECT_HOLD)
Index: src/s_user.c
===================================================================
RCS file: /cvsroot/ircd-hybrid-6/src/s_user.c,v
retrieving revision 1.248
diff -c -r1.248 s_user.c
*** src/s_user.c	23 Jan 2002 18:39:08 -0000	1.248
--- src/s_user.c	11 Feb 2002 02:59:00 -0000
***************
*** 84,89 ****
--- 84,90 ----
    {FLAGS_NCHANGE, 'n'},
    {FLAGS_OPER, 'o'},
    {FLAGS_LOCOP, 'O'},
+   {FLAGS_HIDDENOPER, 'p'},
    {FLAGS_REJ, 'r'},
    {FLAGS_SERVNOTICE, 's'},
    {FLAGS_WALLOP, 'w'},
***************
*** 145,151 ****
    0,            /* m */
    FLAGS_NCHANGE, /* n */
    FLAGS_OPER,   /* o */
!   0,            /* p */
    0,            /* q */
    FLAGS_REJ,    /* r */
    FLAGS_SERVNOTICE, /* s */
--- 146,152 ----
    0,            /* m */
    FLAGS_NCHANGE, /* n */
    FLAGS_OPER,   /* o */
!   FLAGS_HIDDENOPER, /* p */
    0,            /* q */
    FLAGS_REJ,    /* r */
    FLAGS_SERVNOTICE, /* s */
***************
*** 186,213 ****
  
    for(cptr2 = oper_cptr_list; cptr2; cptr2 = cptr2->next_oper_client)
      {
!       ++j;
!       if (MyClient(cptr) && IsAnOper(cptr))
!         {
!           sendto_one(cptr, ":%s %d %s :[%c][%s] %s (%s@%s) Idle: %d",
                       me.name, RPL_STATSDEBUG, cptr->name,
                       IsOper(cptr2) ? 'O' : 'o',
!                      oper_privs_as_string(cptr2,
!                                           cptr2->confs->value.aconf->port),
!                      cptr2->name,
!                      cptr2->username, cptr2->host,
                       CurrentTime - cptr2->user->last);
!         }
!       else
!         {
            sendto_one(cptr, ":%s %d %s :[%c] %s (%s@%s) Idle: %d",
                       me.name, RPL_STATSDEBUG, cptr->name,
                       IsOper(cptr2) ? 'O' : 'o',
!                      cptr2->name,
!                      cptr2->username, cptr2->host,
                       CurrentTime - cptr2->user->last);
!         }
!     }
  
    sendto_one(cptr, ":%s %d %s :%d OPER%s", me.name, RPL_STATSDEBUG,
               cptr->name, j, (j==1) ? "" : "s");
--- 187,226 ----
  
    for(cptr2 = oper_cptr_list; cptr2; cptr2 = cptr2->next_oper_client)
      {
! 	  if (IsAnOper(cptr))
! 	  {
! 		if (MyClient(cptr))
! 		{
! 		  sendto_one(cptr, ":%s %d %s :[%c][%s] %s (%s@%s) Idle: %d",
! 					 me.name, RPL_STATSDEBUG, cptr->name,
! 					 IsOper(cptr2) ? 'O' : 'o',
! 					 oper_privs_as_string(cptr2, cptr2->confs->value.aconf->port),
! 					 cptr2->name, cptr2->username, cptr2->host,
! 					 CurrentTime - cptr2->user->last);
! 		}
! 		else
! 		{
!           sendto_one(cptr, ":%s %d %s :[%c] %s (%s@%s) Idle: %d",
                       me.name, RPL_STATSDEBUG, cptr->name,
                       IsOper(cptr2) ? 'O' : 'o',
!                      cptr2->name, cptr2->username, cptr2->host,
                       CurrentTime - cptr2->user->last);
! 		}
! 		j++;
! 	  }
! 	  else
! 	  {
! 		if (!IsHiddenOper(cptr2))
! 		{
            sendto_one(cptr, ":%s %d %s :[%c] %s (%s@%s) Idle: %d",
                       me.name, RPL_STATSDEBUG, cptr->name,
                       IsOper(cptr2) ? 'O' : 'o',
!                      cptr2->name, cptr2->username, cptr2->host,
                       CurrentTime - cptr2->user->last);
! 		  j++;
! 		}
! 	  }
! 	}
  
    sendto_one(cptr, ":%s %d %s :%d OPER%s", me.name, RPL_STATSDEBUG,
               cptr->name, j, (j==1) ? "" : "s");
***************
*** 2098,2103 ****
--- 2111,2122 ----
              }
            break;
          }
+ 
+   if ((sptr->umodes & FLAGS_HIDDENOPER) && !IsAnOper(sptr))
+   {
+ 	sptr->umodes &= ~FLAGS_HIDDENOPER;
+ 	if (!(setflags & (FLAGS_OPER|FLAGS_LOCOP))) badflag = YES;
+   }
  
    if(badflag)
      sendto_one(sptr, form_str(ERR_UMODEUNKNOWNFLAG), me.name, parv[0]);
