Author: Kev <klmitch@mit.edu>
authorKevin L. Mitchell <klmitch@mit.edu>
Tue, 2 May 2000 20:25:32 +0000 (20:25 +0000)
committerKevin L. Mitchell <klmitch@mit.edu>
Tue, 2 May 2000 20:25:32 +0000 (20:25 +0000)
Log message:

Starting to remove dead code; noted a sendto_ops use in a header file;
marked a sendto_one in hunt_server more clearly

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

ChangeLog
include/querycmds.h
include/send.h
ircd/s_user.c
ircd/send.c

index 3721a133ea927c355a341f8da24568763bc0b04f..3e034c356b0e46b46021541da143703838b60ad8 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,15 @@
 2000-05-02  Kevin L. Mitchell  <klmitch@mit.edu>
 
+       * ircd/s_user.c (hunt_server): throw in a comment so I know what
+       the sendto_one is for
+
+       * include/querycmds.h (Count_unknownbecomesclient): convert to
+       sendto_opmask_butone
+
+       * ircd/send.c: start removing dead code
+
+       * include/send.h: start removing dead code
+
        * ircd/m_rping.c: convert to sendcmdto_one / send_reply /
        hunt_server_cmd
 
 #
 # ChangeLog for ircu2.10.11
 #
-# $Id: ChangeLog,v 1.126 2000-05-02 20:09:30 kev Exp $
+# $Id: ChangeLog,v 1.127 2000-05-02 20:25:32 kev Exp $
 #
 # Insert new changes at beginning of the change list.
 #
index 2fac50504ec655d6e63672e962cf7352eb414a54..3052c1f85ccf1d296a7a1a4fd7a94c6a9e7eacf2 100644 (file)
@@ -65,7 +65,7 @@ extern struct UserStatistics UserStats;
     { \
       max_connection_count = UserStats.local_clients + UserStats.local_servers; \
       if (max_connection_count % 10 == 0) \
-        sendto_ops("Maximum connections: %d (%d clients)", \
+        sendto_opmask_butone(0, SNO_OLDSNO, "Maximum connections: %d (%d clients)", \
             max_connection_count, max_client_count); \
     } \
   } while(0)
index 19b8cf639b7bdccb19ebcd7699d5cf1b5b4ef2b1..088da8c47817749ff455ce4add83c8f0c276643c 100644 (file)
@@ -27,8 +27,6 @@ extern void sendto_ops(const char* fmt, ...);
 extern void sendto_channel_butserv(struct Channel *chptr, struct Client *from,
                                    const char* fmt, ...);
 extern void sendto_serv_butone(struct Client *one, const char* fmt, ...);
-extern void sendto_match_servs(struct Channel* chptr, struct Client* from,
-                               const char* fmt, ...);
 extern void sendto_lowprot_butone(struct Client *cptr, int p,
                                   const char* fmt, ...);
 extern void sendto_highprot_butone(struct Client *cptr, int p,
@@ -38,8 +36,6 @@ extern void sendto_prefix_one(struct Client *to, struct Client *from,
 extern void flush_connections(struct Client* cptr);
 extern void send_queued(struct Client *to);
 extern void vsendto_one(struct Client *to, const char* fmt, va_list vl);
-extern void sendto_channel_butone(struct Client *one, struct Client *from,
-                                  struct Channel *chptr, const char* fmt, ...);
 extern void sendmsgto_channel_butone(struct Client *one, struct Client *from,
                                   struct Channel *chptr, const char *sender,
                                   const char *cmd, const char *chname, const char *msg);
@@ -50,7 +46,6 @@ extern void sendto_chanopsserv_butone(struct Client *one, struct Client *from,
 extern void sendto_common_channels(struct Client *user, const char* fmt, ...);
 extern void sendto_match_butone(struct Client *one, struct Client *from,
                                 const char *mask, int what, const char* fmt, ...);
-extern void sendto_lops_butone(struct Client *one, const char* fmt, ...);
 extern void vsendto_ops(const char *pattern, va_list vl);
 extern void sendto_ops_butone(struct Client *one, struct Client *from,
                               const char* fmt, ...);
index ff7cb118c38b8e02eb9e5f6982578ca77d650098..cb6fd5af0efaf3449b757161d8ff09879ca7f3d2 100644 (file)
@@ -266,7 +266,7 @@ int hunt_server(int MustBeOper, struct Client *cptr, struct Client *sptr, char *
 
   assert(!IsServer(sptr));
   /* XXX sendto_one used with explicit command; must be very careful */
-  sendto_one(acptr, command, NumNick(sptr), parv[1], parv[2], parv[3], parv[4],
+  sendto_one(acptr, command, NumNick(sptr), parv[1], parv[2], parv[3], parv[4], /* XXX hunt_server */
       parv[5], parv[6], parv[7], parv[8]);
 
   return (HUNTED_PASS);
index 9c1ee96a40b2c35b8689efa8415cee46a2481008..5483868eb0159489835e9dcc1a82392d8f5a7579 100644 (file)
@@ -330,40 +330,6 @@ static void vsendto_prefix_one(struct Client *to, struct Client *from,
   sendbufto_one(to);
 }
 
-/* See sendcmdto_channel_butone, below */
-void sendto_channel_butone(struct Client *one, struct Client *from, struct Channel *chptr,
-    const char* pattern, ...)
-{
-  va_list vl;
-  struct Membership* member;
-  struct Client *acptr;
-  int i;
-
-  va_start(vl, pattern);
-
-  ++sentalong_marker;
-  for (member = chptr->members; member; member = member->next_member)
-  {
-    acptr = member->user;
-    /* ...was the one I should skip */
-    if (acptr->from == one || IsZombie(member) || IsDeaf(acptr))
-      continue;
-    if (MyConnect(acptr))       /* (It is always a client) */
-      vsendto_prefix_one(acptr, from, pattern, vl);
-    else if (-1 < (i = acptr->from->fd) && sentalong[i] != sentalong_marker)
-    {
-      sentalong[i] = sentalong_marker;
-      /*
-       * Don't send channel messages to links that are still eating
-       * the net.burst: -- Run 2/1/1997
-       */
-      if (!IsBurstOrBurstAck(acptr->from))
-        vsendto_prefix_one(acptr, from, pattern, vl);
-    }
-  }
-  va_end(vl);
-}
-
 /* See sendcmdto_channel_butone, below */
 void sendmsgto_channel_butone(struct Client *one, struct Client *from,
                               struct Channel *chptr, const char *sender,
@@ -724,35 +690,6 @@ void sendto_match_butone(struct Client *one, struct Client *from,
   return;
 }
 
-/*
- * sendto_lops_butone
- *
- * Send to *local* ops but one.
- */
-/* See sendto_opmask_butone, below */
-void sendto_lops_butone(struct Client* one, const char* pattern, ...)
-{
-  va_list         vl;
-  struct Client*  cptr;
-  struct Client** clients = me.serv->client_list;
-  int             i;
-  char            nbuf[1024];
-
-  assert(0 != clients);
-
-  sprintf_irc(nbuf, ":%s NOTICE %%s :*** Notice -- ", me.name);
-  va_start(vl, pattern);
-  vsprintf_irc(nbuf + strlen(nbuf), pattern, vl);
-  va_end(vl);
-
-  for (i = 0; i <= me.serv->nn_mask; ++i) {
-    if ((cptr = clients[i]) && cptr != one && SendServNotice(cptr)) {
-      sprintf_irc(sendbuf, nbuf, cptr->name);
-      sendbufto_one(cptr);
-    }
-  }
-}
-
 /*
  * sendto_op_mask
  *