? locops.diff
Index: include/client.h
===================================================================
RCS file: /cvsroot/ircd-hybrid-6/include/client.h,v
retrieving revision 1.61
diff -u -r1.61 client.h
--- include/client.h	17 Feb 2002 05:58:09 -0000	1.61
+++ include/client.h	29 Apr 2002 23:30:53 -0000
@@ -324,22 +324,23 @@
 #define FLAGS_IPHASH       0x1000 /* iphashed this client */
 
 /* umodes, settable flags */
-#define FLAGS_SERVNOTICE   0x0001 /* server notices such as kill */
-#define FLAGS_CCONN        0x0002 /* Client Connections */
-#define FLAGS_REJ          0x0004 /* Bot Rejections */
-#define FLAGS_SKILL        0x0008 /* Server Killed */
-#define FLAGS_FULL         0x0010 /* Full messages */
-#define FLAGS_SPY          0x0020 /* see STATS / LINKS */
-#define FLAGS_DEBUG        0x0040 /* 'debugging' info */
-#define FLAGS_NCHANGE      0x0080 /* Nick change notice */
-#define FLAGS_WALLOP       0x0100 /* send wallops to them */
-#define FLAGS_OPERWALL     0x0200 /* Operwalls */
-#define FLAGS_INVISIBLE    0x0400 /* makes user invisible */
-#define FLAGS_BOTS         0x0800 /* shows bots */
-#define FLAGS_EXTERNAL     0x1000 /* show servers introduced */
+#define FLAGS_SERVNOTICE   0x00001 /* server notices such as kill */
+#define FLAGS_CCONN        0x00002 /* Client Connections */
+#define FLAGS_REJ          0x00004 /* Bot Rejections */
+#define FLAGS_SKILL        0x00008 /* Server Killed */
+#define FLAGS_FULL         0x00010 /* Full messages */
+#define FLAGS_SPY          0x00020 /* see STATS / LINKS */
+#define FLAGS_DEBUG        0x00040 /* 'debugging' info */
+#define FLAGS_NCHANGE      0x00080 /* Nick change notice */
+#define FLAGS_WALLOP       0x00100 /* send wallops to them */
+#define FLAGS_OPERWALL     0x00200 /* Operwalls */
+#define FLAGS_INVISIBLE    0x00400 /* makes user invisible */
+#define FLAGS_BOTS         0x00800 /* shows bots */
+#define FLAGS_EXTERNAL     0x01000 /* show servers introduced */
 /* user information flags, only settable by remote mode or local oper */
-#define FLAGS_OPER         0x4000 /* Operator */
-#define FLAGS_LOCOP        0x8000 /* Local operator -- SRB */
+#define FLAGS_OPER         0x04000 /* Operator */
+#define FLAGS_LOCOP        0x08000 /* Local operator -- SRB */
+#define FLAGS_LOCOPS       0x10000 /* local wallops */
 
 /* *sigh* overflow flags */
 #define FLAGS2_RESTRICTED   0x0001      /* restricted client */
@@ -387,16 +388,18 @@
 #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_BOTS | FLAGS_EXTERNAL | FLAGS_LOCOP | \
+		      FLAGS_LOCOPS)
 
 #ifndef OPER_UMODES
 #define OPER_UMODES  (FLAGS_OPER | FLAGS_WALLOP | FLAGS_SERVNOTICE | \
-                      FLAGS_SPY | FLAGS_OPERWALL | FLAGS_DEBUG | FLAGS_BOTS)
+                      FLAGS_SPY | FLAGS_OPERWALL | FLAGS_DEBUG | FLAGS_BOTS|\
+		      FLAGS_LOCOPS)
 #endif /* OPER_UMODES */
 
 #ifndef LOCOP_UMODES
 #define LOCOP_UMODES (FLAGS_LOCOP | FLAGS_WALLOP | FLAGS_SERVNOTICE | \
-                      FLAGS_SPY | FLAGS_DEBUG | FLAGS_BOTS)
+                      FLAGS_SPY | FLAGS_DEBUG | FLAGS_BOTS| FLAGS_LOCOPS)
 #endif /* LOCOP_UMODES */
 
 #define FLAGS_ID     (FLAGS_NEEDID | FLAGS_GOTID)
@@ -441,6 +444,7 @@
 #define SendDebugNotice(x)      ((x)->umodes & FLAGS_DEBUG)
 #define SendNickChange(x)       ((x)->umodes & FLAGS_NCHANGE)
 #define SetWallops(x)           ((x)->umodes |= FLAGS_WALLOP)
+#define SendLocops(x)		(((x)->umodes & FLAGS_LOCOPS) && IsAnOper(x))
 
 
 #ifdef REJECT_HOLD
Index: include/send.h
===================================================================
RCS file: /cvsroot/ircd-hybrid-6/include/send.h,v
retrieving revision 1.15
diff -u -r1.15 send.h
--- include/send.h	2 Feb 2002 20:58:27 -0000	1.15
+++ include/send.h	29 Apr 2002 23:30:54 -0000
@@ -19,7 +19,7 @@
 
 /* send.c prototypes */
 
-extern  void send_operwall(struct Client *,char *,char *);
+extern  void send_operwall(struct Client *,char *,char *, int);
 extern  void sendto_channel_type_notice(struct Client *, 
                                         struct Channel *, int, char *);
 extern  void send_knock(struct Client *, struct Client *, 
Index: src/m_locops.c
===================================================================
RCS file: /cvsroot/ircd-hybrid-6/src/m_locops.c,v
retrieving revision 1.2
diff -u -r1.2 m_locops.c
--- src/m_locops.c	10 Aug 1999 02:46:24 -0000	1.2
+++ src/m_locops.c	29 Apr 2002 23:30:54 -0000
@@ -130,7 +130,7 @@
           if(parv[1])
             {
               message = parv[1];
-              send_operwall(acptr, "SLOCOPS", message);
+              send_operwall(acptr, "SLOCOPS", message, 1);
             }
           else
             return 0;
@@ -163,7 +163,7 @@
 #ifdef SLAVE_SERVERS
       sendto_slaves(NULL,"LOCOPS",sptr->name,parc,parv);
 #endif
-      send_operwall(sptr, "LOCOPS", message);
+      send_operwall(sptr, "LOCOPS", message, 1);
     }
   else
     {
Index: src/m_operwall.c
===================================================================
RCS file: /cvsroot/ircd-hybrid-6/src/m_operwall.c,v
retrieving revision 1.3
diff -u -r1.3 m_operwall.c
--- src/m_operwall.c	17 Oct 2001 15:13:31 -0000	1.3
+++ src/m_operwall.c	29 Apr 2002 23:30:55 -0000
@@ -118,7 +118,7 @@
 
   sendto_serv_butone(IsServer(cptr) ? cptr : NULL, ":%s OPERWALL :%s",
                      parv[0], message);
-  send_operwall(sptr, "OPERWALL", message);
+  send_operwall(sptr, "OPERWALL", message, 0);
   return 0;
 }
 
Index: src/m_wallops.c
===================================================================
RCS file: /cvsroot/ircd-hybrid-6/src/m_wallops.c,v
retrieving revision 1.3
diff -u -r1.3 m_wallops.c
--- src/m_wallops.c	17 Oct 2001 15:13:31 -0000	1.3
+++ src/m_wallops.c	29 Apr 2002 23:30:55 -0000
@@ -120,7 +120,7 @@
 
   if(!IsServer(sptr))   /* If source of message is not a server, i.e. oper */
     {
-      send_operwall(sptr, "WALLOPS", message);
+      send_operwall(sptr, "WALLOPS", message, 0);
       sendto_serv_butone( IsServer(cptr) ? cptr : NULL,
                           ":%s WALLOPS :%s", parv[0], message);
     }
Index: src/s_conf.c
===================================================================
RCS file: /cvsroot/ircd-hybrid-6/src/s_conf.c,v
retrieving revision 1.237
diff -u -r1.237 s_conf.c
--- src/s_conf.c	28 Apr 2002 08:13:02 -0000	1.237
+++ src/s_conf.c	29 Apr 2002 23:31:02 -0000
@@ -3152,6 +3152,8 @@
         int_flags |= FLAGS_EXTERNAL;
       else if(*flags == 'z')
         int_flags |= FLAGS_OPERWALL;
+      else if(*flags == 'l')
+	int_flags |= FLAGS_LOCOPS;
       flags++;
     }
 
@@ -3201,6 +3203,8 @@
     *flags_ptr++ = 'x';
   if(flags & FLAGS_OPERWALL)
     *flags_ptr++ = 'z';
+  if(flags & FLAGS_LOCOPS)
+    *flags_ptr++ = 'l';
   *flags_ptr = '\0';
 
   return(flags_out);
Index: src/s_user.c
===================================================================
RCS file: /cvsroot/ircd-hybrid-6/src/s_user.c,v
retrieving revision 1.248
diff -u -r1.248 s_user.c
--- src/s_user.c	23 Jan 2002 18:39:08 -0000	1.248
+++ src/s_user.c	29 Apr 2002 23:31:04 -0000
@@ -90,6 +90,7 @@
   {FLAGS_EXTERNAL, 'x'},
   {FLAGS_SPY, 'y'},
   {FLAGS_OPERWALL, 'z'},
+  {FLAGS_LOCOPS, 'l'},
   {0, 0}
 };
 
@@ -141,7 +142,7 @@
   FLAGS_INVISIBLE, /* i */
   0,            /* j */
   FLAGS_SKILL,  /* k */
-  0,            /* l */
+  FLAGS_LOCOPS, /* l */
   0,            /* m */
   FLAGS_NCHANGE, /* n */
   FLAGS_OPER,   /* o */
Index: src/send.c
===================================================================
RCS file: /cvsroot/ircd-hybrid-6/src/send.c,v
retrieving revision 1.112
diff -u -r1.112 send.c
--- src/send.c	2 Feb 2002 20:58:30 -0000	1.112
+++ src/send.c	29 Apr 2002 23:31:06 -0000
@@ -1215,7 +1215,7 @@
 */
 
 void
-send_operwall(aClient *from, char *type_message, char *message)
+send_operwall(aClient *from, char *type_message, char *message, int locops)
 
 {
   char sender[NICKLEN + USERLEN + HOSTLEN + 5];
@@ -1245,13 +1245,25 @@
 
   for (acptr = oper_cptr_list; acptr; acptr = acptr->next_oper_client)
     {
-      if (!SendOperwall(acptr))
-        continue; /* has to be oper if in this linklist */
+      /* kludge - operwall isnt used often enough for it to affect stuff */
+      if(locops)
+      {
+        if(!SendLocops(acptr))
+          continue;
+
+	sendto_one(acptr, ":%s WALLOPS :%s - %s", sender, type_message, message);
+      }
+      else
+      {
+        if (!SendOperwall(acptr)) 
+          continue; /* has to be oper if in this linklist */
 
-      sendto_one(acptr, ":%s WALLOPS :%s - %s", sender, type_message, message);
+        sendto_one(acptr, ":%s WALLOPS :%s - %s", sender, type_message, message);
+      }
     }
 } /* send_operwall() */
 
+  
 /*
  * to - destination client
  * from - client which message is from
