Author: Kev <klmitch@mit.edu>
authorKevin L. Mitchell <klmitch@mit.edu>
Fri, 28 Apr 2000 17:34:45 +0000 (17:34 +0000)
committerKevin L. Mitchell <klmitch@mit.edu>
Fri, 28 Apr 2000 17:34:45 +0000 (17:34 +0000)
Log message:

a couple more of the send.c conversions, and make all those RPL_EXPLICITs
into SND_EXPLICITs

Status: Unstable, needs testing
Testing needed:

Still need to verify all of the command code paths carefully

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

21 files changed:
ChangeLog
include/ircd_reply.h
ircd/gline.c
ircd/ircd.c
ircd/ircd_relay.c
ircd/ircd_reply.c
ircd/list.c
ircd/m_defaults.c
ircd/m_desynch.c
ircd/m_info.c
ircd/m_motd.c
ircd/m_pong.c
ircd/m_proto.c
ircd/m_rehash.c
ircd/m_userhost.c
ircd/m_whois.c
ircd/res.c
ircd/s_conf.c
ircd/s_debug.c
ircd/s_misc.c
ircd/s_user.c

index 29e7f0e62cbc089522fb75a59e683bb46f4dceb8..2c9e0132af24d32e1f47a2fa2c8860c453a6f467 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,19 @@
 2000-04-28  Kevin L. Mitchell  <klmitch@mit.edu>
 
+       * include/ircd_reply.h (SND_EXPLICIT): use instead of RPL_EXPLICIT
+
+       * ircd/ircd_reply.c (send_reply): use SND_EXPLICIT instead of
+       RPL_EXPLICIT
+
+       * ircd/m_userhost.c (m_userhost): add a dead code comment
+
+       * ircd/m_desynch.c: forgot one...
+
+       * ircd/m_rehash.c (mo_rehash): er, duplicates :)
+
+       * ircd/m_proto.c (proto_send_supported): just change a comment so
+       it doesn't show up in my scans
+
        * ircd/ircd_reply.c (send_reply): fix a slight bug...
 
        * ircd/s_numeric.c (do_numeric): use new sendcmdto_* functions,
 #
 # ChangeLog for ircu2.10.11
 #
-# $Id: ChangeLog,v 1.111 2000-04-28 16:16:06 kev Exp $
+# $Id: ChangeLog,v 1.112 2000-04-28 17:34:44 kev Exp $
 #
 # Insert new changes at beginning of the change list.
 #
index c792bdb21caafcbee7ae3af7ba1c0478ebd0abde..a99ac3e97c7de35bcb03ac66c6eda68fd0a64285 100644 (file)
@@ -30,7 +30,7 @@ extern int send_error_to_client(struct Client* cptr, int error, ...);
 extern int send_reply(struct Client *to, int reply, ...);
 extern int send_admin_info(struct Client* sptr, const struct ConfItem* data);
 
-#define RPL_EXPLICIT   0x40000000      /* first arg is a pattern to use */
+#define SND_EXPLICIT   0x40000000      /* first arg is a pattern to use */
 
 #endif /* INCLUDED_ircd_reply_h */
 
index 86017fc0fddc56e2060279cee828c05e766beb1d..a79f5d8067fb7100e2d3eed82871ce38528855b4 100644 (file)
@@ -152,7 +152,7 @@ do_gline(struct Client *cptr, struct Client *sptr, struct Gline *gline)
          (!acptr->user->username ||
           match(gline->gl_user, acptr->user->username) == 0)) {
        /* ok, here's one that got G-lined */
-       send_reply(acptr, RPL_EXPLICIT | ERR_YOUREBANNEDCREEP, ":%s",
+       send_reply(acptr, SND_EXPLICIT | ERR_YOUREBANNEDCREEP, ":%s",
                   gline->gl_reason);
 
        /* let the ops know about it */
index f49033145a66d2041e123f0419feebc38c32d5c7..47ea5c691676c12851bea4ad95c206563f7f973b 100644 (file)
@@ -340,9 +340,9 @@ static time_t check_pings(void)
        * nospoof PONG.
        */
       if (*cptr->name && cptr->user && *cptr->user->username) {
-       send_reply(cptr, RPL_EXPLICIT | ERR_BADPING,
+       send_reply(cptr, SND_EXPLICIT | ERR_BADPING,
                   ":Your client may not be compatible with this server.");
-       send_reply(cptr, RPL_EXPLICIT | ERR_BADPING,
+       send_reply(cptr, SND_EXPLICIT | ERR_BADPING,
                   ":Compatible clients are available at "
                   "ftp://ftp.undernet.org/pub/irc/clients");
       }    
index a6d771db39aad15c394dea49f302b2445c2ba9c8..7930420a9131aa7adcd64064d7d59f5d88253206 100644 (file)
@@ -291,7 +291,7 @@ void server_relay_private_message(struct Client* sptr, const char* name, const c
    * nickname addressed?
    */
   if (0 == (acptr = findNUser(name)) || !IsUser(acptr)) {
-    send_reply(sptr, RPL_EXPLICIT | ERR_NOSUCHNICK, "* :Target left UnderNet. "
+    send_reply(sptr, SND_EXPLICIT | ERR_NOSUCHNICK, "* :Target left UnderNet. "
               "Failed to deliver: [%.20s]", text);
     return;
   }
index 043da3cfc1494820c65d7de37089690f4123befd..57a97de236c6c790faa53d29d5f40bd7af4d49e2 100644 (file)
@@ -101,11 +101,11 @@ int send_reply(struct Client *to, int reply, ...)
   assert(0 != to);
   assert(0 != reply);
 
-  num = get_error_numeric(reply & ~RPL_EXPLICIT); /* get reply... */
+  num = get_error_numeric(reply & ~SND_EXPLICIT); /* get reply... */
 
   va_start(vd.vd_args, reply);
 
-  if (reply & RPL_EXPLICIT) /* get right pattern */
+  if (reply & SND_EXPLICIT) /* get right pattern */
     vd.vd_format = (const char *) va_arg(vd.vd_args, char *);
   else
     vd.vd_format = num->format;
index 0eff954a852322ca6b5957fdd8dd3ac252266482..275062ee331ff421789aedb69b789f2cf5b4cdcd 100644 (file)
@@ -315,34 +315,34 @@ void send_listinfo(struct Client *cptr, char *name)
 {
   int inuse = 0, mem = 0, tmp = 0;
 
-  send_reply(cptr, RPL_EXPLICIT | RPL_STATSDEBUG, ":Local: inuse: %d(%d)",
+  send_reply(cptr, SND_EXPLICIT | RPL_STATSDEBUG, ":Local: inuse: %d(%d)",
             inuse += cloc.inuse, tmp = cloc.inuse * CLIENT_LOCAL_SIZE);
   mem += tmp;
-  send_reply(cptr, RPL_EXPLICIT | RPL_STATSDEBUG, ":Remote: inuse: %d(%d)",
+  send_reply(cptr, SND_EXPLICIT | RPL_STATSDEBUG, ":Remote: inuse: %d(%d)",
             crem.inuse, tmp = crem.inuse * CLIENT_REMOTE_SIZE);
   mem += tmp;
   inuse += crem.inuse;
-  send_reply(cptr, RPL_EXPLICIT | RPL_STATSDEBUG, ":Users: inuse: %d(%d)",
+  send_reply(cptr, SND_EXPLICIT | RPL_STATSDEBUG, ":Users: inuse: %d(%d)",
             users.inuse, tmp = users.inuse * sizeof(struct User));
   mem += tmp;
   inuse += users.inuse;
-  send_reply(cptr, RPL_EXPLICIT | RPL_STATSDEBUG, ":Servs: inuse: %d(%d)",
+  send_reply(cptr, SND_EXPLICIT | RPL_STATSDEBUG, ":Servs: inuse: %d(%d)",
             servs.inuse, tmp = servs.inuse * sizeof(struct Server));
   mem += tmp;
   inuse += servs.inuse;
-  send_reply(cptr, RPL_EXPLICIT | RPL_STATSDEBUG, ":Links: inuse: %d(%d)",
+  send_reply(cptr, SND_EXPLICIT | RPL_STATSDEBUG, ":Links: inuse: %d(%d)",
             links.inuse, tmp = links.inuse * sizeof(struct SLink));
   mem += tmp;
   inuse += links.inuse;
-  send_reply(cptr, RPL_EXPLICIT | RPL_STATSDEBUG, ":Classes: inuse: %d(%d)",
+  send_reply(cptr, SND_EXPLICIT | RPL_STATSDEBUG, ":Classes: inuse: %d(%d)",
             classs.inuse, tmp = classs.inuse * sizeof(struct ConfClass));
   mem += tmp;
   inuse += classs.inuse;
-  send_reply(cptr, RPL_EXPLICIT | RPL_STATSDEBUG, ":Confs: inuse: %d(%d)",
+  send_reply(cptr, SND_EXPLICIT | RPL_STATSDEBUG, ":Confs: inuse: %d(%d)",
             GlobalConfCount, tmp = GlobalConfCount * sizeof(struct ConfItem));
   mem += tmp;
   inuse += GlobalConfCount;
-  send_reply(cptr, RPL_EXPLICIT | RPL_STATSDEBUG, ":Totals: inuse %d %d",
+  send_reply(cptr, SND_EXPLICIT | RPL_STATSDEBUG, ":Totals: inuse %d %d",
             inuse, mem);
 }
 
index 4404cc1d93047923eab753f17d315abfe331855d..06f6baacb35945742f0edf7b2b1758124ba5dccf 100644 (file)
@@ -105,7 +105,7 @@ int m_not_oper(struct Client* cptr, struct Client* sptr, int parc, char* parv[])
 
 int m_unregistered(struct Client* cptr, struct Client* sptr, int parc, char* parv[])
 {
-  send_reply(cptr, RPL_EXPLICIT | ERR_NOTREGISTERED, "%s :Register first.",
+  send_reply(cptr, SND_EXPLICIT | ERR_NOTREGISTERED, "%s :Register first.",
             parv[0]);
   return 0;
 }
@@ -123,7 +123,7 @@ int m_ignore(struct Client* cptr, struct Client* sptr, int parc, char* parv[])
 int m_unsupported(struct Client* cptr, struct Client* sptr, int parc, char* parv[])
 {
 #if 0
-  send_reply(cptr, RPL_EXPLICIT | ERR_UNSUPPORTED, "%s :Unsupported command",
+  send_reply(cptr, SND_EXPLICIT | ERR_UNSUPPORTED, "%s :Unsupported command",
             parv[0]);
 #endif
   return 0;
index 89b998c92c8a8426180e9376b27fa480dbc917a3..de7cad80c0d86f8f7719d95d612a1adf1cb5948f 100644 (file)
@@ -92,6 +92,7 @@
 #include "ircd.h"
 #include "ircd_reply.h"
 #include "ircd_string.h"
+#include "msg.h"
 #include "numeric.h"
 #include "numnicks.h"
 #include "s_bsd.h"
 int ms_desynch(struct Client* cptr, struct Client* sptr, int parc, char* parv[])
 {
   if (IsServer(sptr) && parc >= 2)
-  {
-    int i;
-    struct Client *acptr;
-    /* Send message to local +g clients as if it were a wallops */
-    sprintf_irc(sendbuf, ":%s WALLOPS :%s", parv[0], parv[parc - 1]);
-    for (i = 0; i <= HighestFd; i++)
-      if ((acptr = LocalClientArray[i]) && !IsServer(acptr) && !IsMe(acptr) &&
-          SendDebug(acptr))
-        sendbufto_one(acptr);
-    /* Send message to remote +g clients */
-    sendto_g_serv_butone(cptr, "%s DESYNCH :%s", NumServ(sptr), parv[parc - 1]);
-  }
+    sendcmdto_flag_butone(sptr, CMD_DESYNCH, cptr, FLAGS_DEBUG, ":%s",
+                         parv[parc - 1]);
+
   return 0;
 }
 
@@ -147,9 +139,9 @@ int m_desynch(struct Client *cptr, struct Client *sptr, int parc, char *parv[])
     for (i = 0; i <= HighestFd; i++)
       if ((acptr = LocalClientArray[i]) && !IsServer(acptr) && !IsMe(acptr) &&
           SendDebug(acptr))
-        sendbufto_one(acptr);
+        sendbufto_one(acptr); /* XXX DEAD */
     /* Send message to remote +g clients */
-    sendto_g_serv_butone(cptr, "%s DESYNCH :%s", NumServ(sptr), parv[parc - 1]);
+    sendto_g_serv_butone(cptr, "%s DESYNCH :%s", NumServ(sptr), parv[parc - 1]); /* XXX DEAD */
   }
   return 0;
 }
index d1c28c9d82a411f44cb1784bfe7f86a136f8dd67..3fe6a26b24f0af2cfe560ebd00fe8ef64eb6608b 100644 (file)
@@ -126,9 +126,9 @@ int m_info(struct Client* cptr, struct Client* sptr, int parc, char* parv[])
        send_reply(sptr, RPL_INFO, *text++);
       send_reply(sptr, RPL_INFO, "");
     }
-    send_reply(sptr, RPL_EXPLICIT | RPL_INFO, ":Birth Date: %s, compile # %s",
+    send_reply(sptr, SND_EXPLICIT | RPL_INFO, ":Birth Date: %s, compile # %s",
               creation, generation);
-    send_reply(sptr, RPL_EXPLICIT | RPL_INFO, ":On-line since %s",
+    send_reply(sptr, SND_EXPLICIT | RPL_INFO, ":On-line since %s",
               myctime(me.firsttime));
     send_reply(sptr, RPL_ENDOFINFO);
   }
@@ -163,9 +163,9 @@ int ms_info(struct Client* cptr, struct Client* sptr, int parc, char* parv[])
        send_reply(sptr, RPL_INFO, *text++);
       send_reply(sptr, RPL_INFO, "");
     }
-    send_reply(sptr, RPL_EXPLICIT | RPL_INFO, ":Birth Date: %s, compile # %s",
+    send_reply(sptr, SND_EXPLICIT | RPL_INFO, ":Birth Date: %s, compile # %s",
               creation, generation);
-    send_reply(sptr, RPL_EXPLICIT | RPL_INFO, ":On-line since %s",
+    send_reply(sptr, SND_EXPLICIT | RPL_INFO, ":On-line since %s",
               myctime(me.firsttime));
     send_reply(sptr, RPL_ENDOFINFO);
   }
@@ -197,9 +197,9 @@ int mo_info(struct Client* cptr, struct Client* sptr, int parc, char* parv[])
        send_reply(sptr, RPL_INFO, *text++);
       send_reply(sptr, RPL_INFO, "");
     }
-    send_reply(sptr, RPL_EXPLICIT | RPL_INFO, ":Birth Date: %s, compile # %s",
+    send_reply(sptr, SND_EXPLICIT | RPL_INFO, ":Birth Date: %s, compile # %s",
               creation, generation);
-    send_reply(sptr, RPL_EXPLICIT | RPL_INFO, ":On-line since %s",
+    send_reply(sptr, SND_EXPLICIT | RPL_INFO, ":On-line since %s",
               myctime(me.firsttime));
     send_reply(sptr, RPL_ENDOFINFO);
   }
index 88eb8f4fc4a383bc804ad50dfd0c2a30d5db395a..4a8354082f6fe55169dcf3d22a3c85d5b53ac094 100644 (file)
@@ -178,7 +178,7 @@ int m_motd(struct Client* cptr, struct Client* sptr, int parc, char* parv[])
     if (tm)                     /* Not remote? */
     {
       send_reply(sptr, RPL_MOTDSTART, me.name);
-      send_reply(sptr, RPL_EXPLICIT | RPL_MOTD, "- %d/%d/%d %d:%02d",
+      send_reply(sptr, SND_EXPLICIT | RPL_MOTD, "- %d/%d/%d %d:%02d",
                 tm->tm_mday, tm->tm_mon + 1, 1900 + tm->tm_year, tm->tm_hour,
                 tm->tm_min);
       count = 100;
@@ -196,9 +196,9 @@ int m_motd(struct Client* cptr, struct Client* sptr, int parc, char* parv[])
   else
   {
     send_reply(sptr, RPL_MOTDSTART, me.name);
-    send_reply(sptr, RPL_EXPLICIT | RPL_MOTD, ":\ 2Type /MOTD to read the "
+    send_reply(sptr, SND_EXPLICIT | RPL_MOTD, ":\ 2Type /MOTD to read the "
               "AUP before continuing using this service.\ 2");
-    send_reply(sptr, RPL_EXPLICIT | RPL_MOTD, ":The message of the day was "
+    send_reply(sptr, SND_EXPLICIT | RPL_MOTD, ":The message of the day was "
               "last changed: %d/%d/%d", tm->tm_mday, tm->tm_mon + 1,
               1900 + tm->tm_year);
   }
@@ -284,7 +284,7 @@ int ms_motd(struct Client* cptr, struct Client* sptr, int parc, char* parv[])
     if (tm)                     /* Not remote? */
     {
       send_reply(sptr, RPL_MOTDSTART, me.name);
-      send_reply(sptr, RPL_EXPLICIT | RPL_MOTD, ":- %d/%d/%d %d:%02d",
+      send_reply(sptr, SND_EXPLICIT | RPL_MOTD, ":- %d/%d/%d %d:%02d",
                 tm->tm_mday, tm->tm_mon + 1, 1900 + tm->tm_year, tm->tm_hour,
                 tm->tm_min);
       count = 100;
@@ -302,9 +302,9 @@ int ms_motd(struct Client* cptr, struct Client* sptr, int parc, char* parv[])
   else
   {
     send_reply(sptr, RPL_MOTDSTART, me.name);
-    send_reply(sptr, RPL_EXPLICIT | RPL_MOTD, ":\ 2Type /MOTD to read the "
+    send_reply(sptr, SND_EXPLICIT | RPL_MOTD, ":\ 2Type /MOTD to read the "
               "AUP before continuing using this service.\ 2");
-    send_reply(sptr, RPL_EXPLICIT | RPL_MOTD, ":The message of the day was "
+    send_reply(sptr, SND_EXPLICIT | RPL_MOTD, ":The message of the day was "
               "last changed: %d/%d/%d", tm->tm_mday, tm->tm_mon + 1,
               1900 + tm->tm_year);
   }
index bbe4d537ff4a144f7bbc20fba184f6041d49664f..95a411ee2e74fd63ad5126a2f177bdbd83badb13 100644 (file)
@@ -170,7 +170,7 @@ int mr_pong(struct Client* cptr, struct Client* sptr, int parc, char* parv[])
         return register_user(cptr, sptr, sptr->name, sptr->user->username);
     }
     else  
-      send_reply(sptr, RPL_EXPLICIT | ERR_BADPING,
+      send_reply(sptr, SND_EXPLICIT | ERR_BADPING,
                 ":To connect, type /QUOTE PONG %u", sptr->cookie);
   }
   return 0;
index 9abd3d1c1699a3c45424fd5ec231ffd25af70e07..fa82b589eeb9d9aa2ba2f32b3cb7870ddfa5122e 100644 (file)
@@ -130,7 +130,7 @@ int proto_handle_req(struct Client* cptr, const char* msg)
 int proto_send_supported(struct Client* cptr)
 {
   /*
-   * sendto_one(cptr, RPL_PROTOLIST, me.name, cptr->name, "stuff");
+   * send_reply(cptr, RPL_PROTOLIST, "stuff");
    */
   return 0;
 }
index 24055ea879320540fc8ebd03ab6b069c25505b7c..0d2358a8f4ead5420cf30f1799593a263be5bd71 100644 (file)
@@ -115,7 +115,6 @@ int mo_rehash(struct Client* cptr, struct Client* sptr, int parc, char* parv[])
 #endif
   {
     send_reply(sptr, ERR_NOPRIVILEGES);
-    sendto_one(sptr, err_str(ERR_NOPRIVILEGES), me.name, parv[0]);
     return 0;
   }
   send_reply(sptr, RPL_REHASHING, configfile);
index b372e582446b82318682e23a6cccd7395f29cd47..a01d38ba20b9b25f2ee4a5395be7b56172ee9ff6 100644 (file)
@@ -155,7 +155,7 @@ int m_userhost(struct Client *cptr, struct Client *sptr, int parc, char *parv[])
     else
     {
       if (i < j)
-        sendbufto_one(sptr);
+        sendbufto_one(sptr); /* XXX DEAD */
       sendto_one(sptr, err_str(ERR_NOSUCHNICK), me.name, parv[0], s); /* XXX DEAD */
       sbuf = sprintf_irc(sendbuf, rpl_str(RPL_USERHOST), me.name, parv[0]);
       j = i - 1;
index 034374f9730ec5fa24ec25dfacbef42215714d76..0f2bf933b53fd10f9efb9d70f7ea0a23bb71dfad 100644 (file)
@@ -245,7 +245,7 @@ exact_match:
             {
               if (len + strlen(chptr->chname) + mlen > BUFSIZE - 5)
               {
-               send_reply(sptr, RPL_EXPLICIT | RPL_WHOISCHANNELS,
+               send_reply(sptr, SND_EXPLICIT | RPL_WHOISCHANNELS,
                           "%s :%s", name, buf);
                 *buf = '\0';
                 len = 0;
@@ -455,7 +455,7 @@ exact_match:
             {
               if (len + strlen(chptr->chname) + mlen > BUFSIZE - 5)
               {
-               send_reply(sptr, RPL_EXPLICIT | RPL_WHOISCHANNELS, 
+               send_reply(sptr, SND_EXPLICIT | RPL_WHOISCHANNELS, 
                           "%s :%s", name, buf);
                 *buf = '\0';
                 len = 0;
@@ -665,7 +665,7 @@ exact_match:
             {
               if (len + strlen(chptr->chname) + mlen > BUFSIZE - 5)
               {
-               send_reply(sptr, RPL_EXPLICIT | RPL_WHOISCHANNELS,
+               send_reply(sptr, SND_EXPLICIT | RPL_WHOISCHANNELS,
                           "%s :%s", name, buf);
                 *buf = '\0';
                 len = 0;
index c708c3f40e89b8aa6aedee91f2f9a6314c126fb8..ba447e29809268c56604e92f1b15064a307748da 100644 (file)
@@ -1726,12 +1726,12 @@ size_t cres_mem(struct Client* sptr)
   }
 
   if (cachedCount != cache_count) {
-    send_reply(sptr, RPL_EXPLICIT | RPL_STATSDEBUG,
+    send_reply(sptr, SND_EXPLICIT | RPL_STATSDEBUG,
               ":Resolver: cache count mismatch: %d != %d", cachedCount,
               cache_count);
     assert(cachedCount == cache_count);
   }
-  send_reply(sptr, RPL_EXPLICIT | RPL_STATSDEBUG,
+  send_reply(sptr, SND_EXPLICIT | RPL_STATSDEBUG,
             ":Resolver: cache %d(%d) requests %d(%d)", cache_count,
             cache_mem, request_count, request_mem);
   return cache_mem + request_mem;
index dbd0f02ab1020f7c9bf3a6e012dc10eb647df8ba..ec96c4900cc27e34d46e9d566f1dbccd4ab1acf0 100644 (file)
@@ -164,7 +164,7 @@ static void killcomment(struct Client *sptr, char *parv, char *filename)
 
   if (NULL == (file = fbopen(filename, "r"))) {
     send_reply(sptr, ERR_NOMOTD);
-    send_reply(sptr, RPL_EXPLICIT | ERR_YOUREBANNEDCREEP,
+    send_reply(sptr, SND_EXPLICIT | ERR_YOUREBANNEDCREEP,
               ":Connection from your host is refused on this server.");
     return;
   }
@@ -177,7 +177,7 @@ static void killcomment(struct Client *sptr, char *parv, char *filename)
       *tmp = '\0';
     send_reply(sptr, RPL_MOTD, line);
   }
-  send_reply(sptr, RPL_EXPLICIT | ERR_YOUREBANNEDCREEP,
+  send_reply(sptr, SND_EXPLICIT | ERR_YOUREBANNEDCREEP,
             ":Connection from your host is refused on this server.");
   fbclose(file);
 }
@@ -1413,14 +1413,14 @@ int find_kill(struct Client *cptr)
     }
   }
   if (reply[0])
-    send_reply(cptr, RPL_EXPLICIT | ERR_YOUREBANNEDCREEP, reply);
+    send_reply(cptr, SND_EXPLICIT | ERR_YOUREBANNEDCREEP, reply);
   else if (tmp) {
     if (EmptyString(tmp->passwd))
-      send_reply(cptr, RPL_EXPLICIT | ERR_YOUREBANNEDCREEP,
+      send_reply(cptr, SND_EXPLICIT | ERR_YOUREBANNEDCREEP,
                 ":Connection from your host is refused on this server.");
     else {
       if (*tmp->passwd == '"') {
-       send_reply(cptr, RPL_EXPLICIT | ERR_YOUREBANNEDCREEP, ":%*s.",
+       send_reply(cptr, SND_EXPLICIT | ERR_YOUREBANNEDCREEP, ":%*s.",
                   strlen(tmp->passwd + 1) - 1, tmp->passwd + 1);
       }
       else if (*tmp->passwd == '!')
@@ -1429,7 +1429,7 @@ int find_kill(struct Client *cptr)
 #ifdef COMMENT_IS_FILE
         killcomment(cptr, cptr->name, tmp->passwd);
 #else
-       send_reply(cptr, RPL_EXPLICIT | ERR_YOUREBANNEDCREEP, ":%s.",
+       send_reply(cptr, SND_EXPLICIT | ERR_YOUREBANNEDCREEP, ":%s.",
                   tmp->passwd);
 #endif
     }
@@ -1438,7 +1438,7 @@ int find_kill(struct Client *cptr)
   /* find active glines */
   /* added a check against the user's IP address to find_gline() -Kev */
   else if ((agline = gline_lookup(cptr)) && GlineIsActive(agline))
-    send_reply(cptr, RPL_EXPLICIT | ERR_YOUREBANNEDCREEP, ":%s.",
+    send_reply(cptr, SND_EXPLICIT | ERR_YOUREBANNEDCREEP, ":%s.",
               GlineReason(agline));
   else
     agline = NULL;                /* if a gline was found, it was inactive */
index bfa98281c4d99eb16eb2378554a72b30c36ea274..904f289d90ba4f3ffd0de3827b74845862a1de35 100644 (file)
@@ -235,7 +235,7 @@ void debug(int level, const char *form, ...)
 static void debug_enumerator(struct Client* cptr, const char* msg)
 {
   assert(0 != cptr);
-  send_reply(cptr, RPL_EXPLICIT | RPL_STATSDEBUG, ":%s", msg);
+  send_reply(cptr, SND_EXPLICIT | RPL_STATSDEBUG, ":%s", msg);
 }
 
 /*
@@ -249,7 +249,7 @@ void send_usage(struct Client *cptr, char *nick)
 {
   os_get_rusage(cptr, CurrentTime - me.since, debug_enumerator);
 
-  send_reply(cptr, RPL_EXPLICIT | RPL_STATSDEBUG, ":DBUF alloc %d used %d",
+  send_reply(cptr, SND_EXPLICIT | RPL_STATSDEBUG, ":DBUF alloc %d used %d",
             DBufAllocCount, DBufUsedCount);
 }
 #endif /* DEBUGMODE */
@@ -355,44 +355,44 @@ void count_memory(struct Client *cptr, char *nick)
   for (cltmp = classes; cltmp; cltmp = cltmp->next)
     cl++;
 
-  send_reply(cptr, RPL_EXPLICIT | RPL_STATSDEBUG,
+  send_reply(cptr, SND_EXPLICIT | RPL_STATSDEBUG,
             ":Client Local %d(%zu) Remote %d(%zu)", lc, lcm, rc, rcm);
-  send_reply(cptr, RPL_EXPLICIT | RPL_STATSDEBUG,
+  send_reply(cptr, SND_EXPLICIT | RPL_STATSDEBUG,
             ":Users %d(%zu) Invites %d(%zu)", us, us * sizeof(struct User),
             usi, usi * sizeof(struct SLink));
-  send_reply(cptr, RPL_EXPLICIT | RPL_STATSDEBUG,
+  send_reply(cptr, SND_EXPLICIT | RPL_STATSDEBUG,
             ":User channels %d(%zu) Aways %d(%zu)", memberships,
             memberships * sizeof(struct Membership), aw, awm);
-  send_reply(cptr, RPL_EXPLICIT | RPL_STATSDEBUG, ":Attached confs %d(%zu)",
+  send_reply(cptr, SND_EXPLICIT | RPL_STATSDEBUG, ":Attached confs %d(%zu)",
             lcc, lcc * sizeof(struct SLink));
 
   totcl = lcm + rcm + us * sizeof(struct User) + memberships * sizeof(struct Membership) + awm;
   totcl += lcc * sizeof(struct SLink) + usi * sizeof(struct SLink);
 
-  send_reply(cptr, RPL_EXPLICIT | RPL_STATSDEBUG, ":Conflines %d(%zu)", co,
+  send_reply(cptr, SND_EXPLICIT | RPL_STATSDEBUG, ":Conflines %d(%zu)", co,
             com);
 
-  send_reply(cptr, RPL_EXPLICIT | RPL_STATSDEBUG, ":Classes %d(%zu)", cl,
+  send_reply(cptr, SND_EXPLICIT | RPL_STATSDEBUG, ":Classes %d(%zu)", cl,
             cl * sizeof(struct ConfClass));
 
-  send_reply(cptr, RPL_EXPLICIT | RPL_STATSDEBUG,
+  send_reply(cptr, SND_EXPLICIT | RPL_STATSDEBUG,
             ":Channels %d(%zu) Bans %d(%zu)", ch, chm, chb, chbm);
-  send_reply(cptr, RPL_EXPLICIT | RPL_STATSDEBUG,
+  send_reply(cptr, SND_EXPLICIT | RPL_STATSDEBUG,
             ":Channel membrs %d(%zu) invite %d(%zu)", memberships,
             memberships * sizeof(struct Membership), chi,
             chi * sizeof(struct SLink));
 
   totch = chm + chbm + chi * sizeof(struct SLink);
 
-  send_reply(cptr, RPL_EXPLICIT | RPL_STATSDEBUG,
+  send_reply(cptr, SND_EXPLICIT | RPL_STATSDEBUG,
             ":Whowas users %d(%zu) away %d(%zu)", wwu,
             wwu * sizeof(struct User), wwa, wwam);
-  send_reply(cptr, RPL_EXPLICIT | RPL_STATSDEBUG, ":Whowas array %d(%zu)",
+  send_reply(cptr, SND_EXPLICIT | RPL_STATSDEBUG, ":Whowas array %d(%zu)",
             NICKNAMEHISTORYLENGTH, wwm);
 
   totww = wwu * sizeof(struct User) + wwam + wwm;
 
-  send_reply(cptr, RPL_EXPLICIT | RPL_STATSDEBUG,
+  send_reply(cptr, SND_EXPLICIT | RPL_STATSDEBUG,
             ":Hash: client %d(%zu), chan is the same", HASHSIZE,
             sizeof(void *) * HASHSIZE);
 
@@ -405,7 +405,7 @@ void count_memory(struct Client *cptr, char *nick)
    * are sent.
    */
   dbuf_count_memory(&dbufs_allocated, &dbufs_used);
-  send_reply(cptr, RPL_EXPLICIT | RPL_STATSDEBUG,
+  send_reply(cptr, SND_EXPLICIT | RPL_STATSDEBUG,
             ":DBufs allocated %d(%zu) used %d(%zu)", DBufAllocCount,
             dbufs_allocated, DBufUsedCount, dbufs_used);
 
@@ -417,11 +417,11 @@ void count_memory(struct Client *cptr, char *nick)
   tot += sizeof(void *) * HASHSIZE * 3;
 
 #if !defined(NDEBUG)
-  send_reply(cptr, RPL_EXPLICIT | RPL_STATSDEBUG, ":Allocations: %zu(%zu)",
+  send_reply(cptr, SND_EXPLICIT | RPL_STATSDEBUG, ":Allocations: %zu(%zu)",
             fda_get_block_count(), fda_get_byte_count());
 #endif
 
-  send_reply(cptr, RPL_EXPLICIT | RPL_STATSDEBUG,
+  send_reply(cptr, SND_EXPLICIT | RPL_STATSDEBUG,
             ":Total: ww %zu ch %zu cl %zu co %zu db %zu", totww, totch,
             totcl, com, dbufs_allocated);
 }
index 8d568b4db1033174c7a2ee7c9d839343aae76e2a..c5d26f4ee907ed7cbfd81963289aa912b2eba896 100644 (file)
@@ -598,27 +598,27 @@ void tstats(struct Client *cptr, char *name)
       sp->is_ni++;
   }
 
-  send_reply(cptr, RPL_EXPLICIT | RPL_STATSDEBUG, ":accepts %u refused %u",
+  send_reply(cptr, SND_EXPLICIT | RPL_STATSDEBUG, ":accepts %u refused %u",
             sp->is_ac, sp->is_ref);
-  send_reply(cptr, RPL_EXPLICIT | RPL_STATSDEBUG,
+  send_reply(cptr, SND_EXPLICIT | RPL_STATSDEBUG,
             ":unknown commands %u prefixes %u", sp->is_unco, sp->is_unpf);
-  send_reply(cptr, RPL_EXPLICIT | RPL_STATSDEBUG,
+  send_reply(cptr, SND_EXPLICIT | RPL_STATSDEBUG,
             ":nick collisions %u unknown closes %u", sp->is_kill, sp->is_ni);
-  send_reply(cptr, RPL_EXPLICIT | RPL_STATSDEBUG,
+  send_reply(cptr, SND_EXPLICIT | RPL_STATSDEBUG,
             ":wrong direction %u empty %u", sp->is_wrdi, sp->is_empt);
-  send_reply(cptr, RPL_EXPLICIT | RPL_STATSDEBUG,
+  send_reply(cptr, SND_EXPLICIT | RPL_STATSDEBUG,
             ":numerics seen %u mode fakes %u", sp->is_num, sp->is_fake);
-  send_reply(cptr, RPL_EXPLICIT | RPL_STATSDEBUG,
+  send_reply(cptr, SND_EXPLICIT | RPL_STATSDEBUG,
             ":auth successes %u fails %u", sp->is_asuc, sp->is_abad);
-  send_reply(cptr, RPL_EXPLICIT | RPL_STATSDEBUG, ":local connections %u",
+  send_reply(cptr, SND_EXPLICIT | RPL_STATSDEBUG, ":local connections %u",
             sp->is_loc);
-  send_reply(cptr, RPL_EXPLICIT | RPL_STATSDEBUG, ":Client server");
-  send_reply(cptr, RPL_EXPLICIT | RPL_STATSDEBUG, ":connected %u %u",
+  send_reply(cptr, SND_EXPLICIT | RPL_STATSDEBUG, ":Client server");
+  send_reply(cptr, SND_EXPLICIT | RPL_STATSDEBUG, ":connected %u %u",
             sp->is_cl, sp->is_sv);
-  send_reply(cptr, RPL_EXPLICIT | RPL_STATSDEBUG, ":bytes sent %u.%uK %u.%uK",
+  send_reply(cptr, SND_EXPLICIT | RPL_STATSDEBUG, ":bytes sent %u.%uK %u.%uK",
             sp->is_cks, sp->is_cbs, sp->is_sks, sp->is_sbs);
-  send_reply(cptr, RPL_EXPLICIT | RPL_STATSDEBUG, ":bytes recv %u.%uK %u.%uK",
+  send_reply(cptr, SND_EXPLICIT | RPL_STATSDEBUG, ":bytes recv %u.%uK %u.%uK",
             sp->is_ckr, sp->is_cbr, sp->is_skr, sp->is_sbr);
-  send_reply(cptr, RPL_EXPLICIT | RPL_STATSDEBUG, ":time connected %Tu %Tu",
+  send_reply(cptr, SND_EXPLICIT | RPL_STATSDEBUG, ":time connected %Tu %Tu",
             sp->is_cti, sp->is_sti);
 }
index 615f86922b6bb3defd150bba4b35ac187e22fdb0..17ebfb50bb278f12fb6ddbe050c3b2938767bac4 100644 (file)
@@ -580,11 +580,11 @@ int register_user(struct Client *cptr, struct Client *sptr,
     {
       ServerStats->is_ref++;
 
-      send_reply(cptr, RPL_EXPLICIT | ERR_INVALIDUSERNAME,
+      send_reply(cptr, SND_EXPLICIT | ERR_INVALIDUSERNAME,
                 ":Your username is invalid.");
-      send_reply(cptr, RPL_EXPLICIT | ERR_INVALIDUSERNAME,
+      send_reply(cptr, SND_EXPLICIT | ERR_INVALIDUSERNAME,
                 ":Connect with your real username, in lowercase.");
-      send_reply(cptr, RPL_EXPLICIT | ERR_INVALIDUSERNAME,
+      send_reply(cptr, SND_EXPLICIT | ERR_INVALIDUSERNAME,
                 ":If your mail address were foo@bar.com, your username "
                 "would be foo.");
       return exit_client(cptr, sptr, &me, "USER: Bad username");