CVSROOT    : /cvsroot/undernet-ircu
Module     : ircu2.10
Commit time: 2003-01-11 12:49:38 UTC

Modified files:
     ChangeLog include/channel.h include/ircd_alloc.h ircd/channel.c
     ircd/client.c ircd/gline.c ircd/ircd_alloc.c ircd/ircd_events.c
     ircd/ircd_log.c ircd/ircd_parser.y ircd/ircd_snprintf.c
     ircd/listener.c ircd/m_nick.c ircd/m_opmode.c ircd/m_whois.c
     ircd/motd.c ircd/s_auth.c ircd/s_bsd.c ircd/uping.c

Log message:

Cleanup code so it builds with C++ again

---------------------- diff included ----------------------
Index: ircu2.10/ChangeLog
diff -u ircu2.10/ChangeLog:1.372 ircu2.10/ChangeLog:1.373
--- ircu2.10/ChangeLog:1.372    Sat Jan 11 03:24:21 2003
+++ ircu2.10/ChangeLog  Sat Jan 11 04:49:22 2003
@@ -1,4 +1,13 @@
 2003-01-11  Thomas Helvey <[EMAIL PROTECTED]>
+       * include/channel.h, include/ircd_alloc.h, ircd/channel.c,
+       ircd/client.c, ircd/gline.c, ircd/ircd_alloc.c,
+       ircd/ircd_events.c, ircd/ircd_log.c, ircd/ircd_parser.y,
+       ircd/ircd_snprintf.c, ircd/listener.c, ircd/m_nick.c,
+       ircd/m_opmode.c, ircd/m_whois.c, ircd/motd.c,
+       ircd/s_auth.c, ircd/s_bsd.c, ircd/uping.c: Server compiles
+       with g++ again, type safety, const correctness fixes,
+       remove C++ keywords again :/
+2003-01-11  Thomas Helvey <[EMAIL PROTECTED]>
        * ircd/client.c, ircd/ircd_feature.c: Bugfix, the feature
        table data was in a different order than the feature data
        structure, which resulted in a wild index being used in
Index: ircu2.10/include/channel.h
diff -u ircu2.10/include/channel.h:1.34 ircu2.10/include/channel.h:1.35
--- ircu2.10/include/channel.h:1.34     Tue Jan  7 19:17:18 2003
+++ ircu2.10/include/channel.h  Sat Jan 11 04:49:24 2003
@@ -17,7 +17,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: channel.h,v 1.34 2003/01/08 03:17:18 klmitch Exp $
+ * $Id: channel.h,v 1.35 2003/01/11 12:49:24 bleepster Exp $
  */
 #ifndef INCLUDED_channel_h
 #define INCLUDED_channel_h
@@ -348,7 +348,12 @@
 extern int is_chan_op(struct Client *cptr, struct Channel *chptr);
 extern int is_zombie(struct Client *cptr, struct Channel *chptr);
 extern int has_voice(struct Client *cptr, struct Channel *chptr);
-extern int IsInvited(struct Client* cptr, struct Channel* chptr);
+/*
+   NOTE: pointer is compared, and not dereferenced, called by
+   add_target with a void*, since targets could be anything,
+   this function can't make any assumptions that it has a channel
+*/
+extern int IsInvited(struct Client* cptr, const void* chptr);
 extern void send_channel_modes(struct Client *cptr, struct Channel *chptr);
 extern char *pretty_mask(char *mask);
 extern void del_invite(struct Client *cptr, struct Channel *chptr);
Index: ircu2.10/include/ircd_alloc.h
diff -u ircu2.10/include/ircd_alloc.h:1.4 ircu2.10/include/ircd_alloc.h:1.5
--- ircu2.10/include/ircd_alloc.h:1.4   Mon Jul  1 00:04:19 2002
+++ ircu2.10/include/ircd_alloc.h       Sat Jan 11 04:49:25 2003
@@ -19,7 +19,7 @@
  *
  * Commentary by Bleep (Thomas Helvey)
  *
- * $Id: ircd_alloc.h,v 1.4 2002/07/01 07:04:19 a1kmm Exp $
+ * $Id: ircd_alloc.h,v 1.5 2003/01/11 12:49:25 bleepster Exp $
  */
 #ifndef INCLUDED_ircd_alloc_h
 #define INCLUDED_ircd_alloc_h
@@ -46,7 +46,6 @@
  * go ahead and write it).
  */
 
-extern void *malloc_tmp;
 
 /* First version: fast non-debugging macros... */
 #ifndef MDEBUG
@@ -58,10 +57,19 @@
 extern OutOfMemoryHandler noMemHandler;
 
 #define DoFree(x, file, line) do { free((x)); (x) = 0; } while(0)
+extern void* DoMalloc(size_t len, const char*, const char*, int);
+extern void* DoMallocZero(size_t len, const char*, const char*, int);
+#if 0
+extern void *malloc_tmp;
+/*
+  Bleah, this is silly, the function call overhead for doing
+  the RightThing(tm) well worth the cost of avoiding this
+  non-reentrant mess of this macro, and accompanying global.
+*/
 #define DoMalloc(size, type, file, line) \
   (\
      (malloc_tmp = malloc(size), \
-     (malloc_tmp == NULL) ? noMemHandler() : 0), \
+     (malloc_tmp == NULL) ? (*noMemHandler)() : 0), \
   malloc_tmp)
 
 #define DoMallocZero(size, type, file, line) \
@@ -69,6 +77,7 @@
     (DoMalloc(size, type, file, line), \
     memset(malloc_tmp, 0, size)), \
   malloc_tmp)
+#endif
 
 /* Second version: slower debugging versions... */
 #else /* defined(MDEBUG) */
Index: ircu2.10/ircd/channel.c
diff -u ircu2.10/ircd/channel.c:1.82 ircu2.10/ircd/channel.c:1.83
--- ircu2.10/ircd/channel.c:1.82        Tue Jan  7 02:06:42 2003
+++ ircu2.10/ircd/channel.c     Sat Jan 11 04:49:25 2003
@@ -17,7 +17,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: channel.c,v 1.82 2003/01/07 10:06:42 a1kmm Exp $
+ * $Id: channel.c,v 1.83 2003/01/11 12:49:25 bleepster Exp $
  */
 #include "config.h"
 
@@ -1462,7 +1462,8 @@
  * of course, str2 is not NULL)
  */
 static void
-build_string(char *strptr, int *strptr_i, char *str1, char *str2, char c)
+build_string(char *strptr, int *strptr_i, const char *str1,
+             const char *str2, char c)
 {
   if (c)
     strptr[(*strptr_i)++] = c;
@@ -3232,7 +3233,7 @@
 }
 
 /* Returns TRUE (1) if client is invited, FALSE (0) if not */
-int IsInvited(struct Client* cptr, struct Channel* chptr)
+int IsInvited(struct Client* cptr, const void* chptr)
 {
   struct SLink *lp;
 
Index: ircu2.10/ircd/client.c
diff -u ircu2.10/ircd/client.c:1.21 ircu2.10/ircd/client.c:1.22
--- ircu2.10/ircd/client.c:1.21 Sat Jan 11 03:24:21 2003
+++ ircu2.10/ircd/client.c      Sat Jan 11 04:49:25 2003
@@ -16,7 +16,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: client.c,v 1.21 2003/01/11 11:24:21 bleepster Exp $
+ * $Id: client.c,v 1.22 2003/01/11 12:49:25 bleepster Exp $
  */
 #include "config.h"
 
@@ -101,18 +101,20 @@
   }
 }
 
+enum FeatureFlag {
+  FEATFLAG_NULL,
+  FEATFLAG_DISABLES_PRIV,
+  FEATFLAG_ENABLES_PRIV,
+  FEATFLAG_GLOBAL_OPERS,
+  FEATFLAG_LOCAL_OPERS,
+  FEATFLAG_ALL_OPERS
+};
+
 static struct
 {
   enum Priv priv;
   enum Feature feat;
-  enum
-    {
-      FEATFLAG_DISABLES_PRIV,
-      FEATFLAG_ENABLES_PRIV,
-      FEATFLAG_GLOBAL_OPERS,
-      FEATFLAG_LOCAL_OPERS,
-      FEATFLAG_ALL_OPERS
-    } flag;
+  enum FeatureFlag flag;
 } feattab[] =
   {
     { PRIV_WHOX, FEAT_LAST_F, FEATFLAG_ALL_OPERS },
@@ -166,7 +168,7 @@
     { PRIV_SEE_CHAN, FEAT_LOCOP_SEE_IN_SECRET_CHANNELS, FEATFLAG_LOCAL_OPERS },
     { PRIV_WIDE_GLINE, FEAT_LOCOP_WIDE_GLINE, FEATFLAG_LOCAL_OPERS },
     
-    { PRIV_LAST_PRIV, FEAT_LAST_F, 0 }
+    { PRIV_LAST_PRIV, FEAT_LAST_F, FEATFLAG_NULL }
   };
 
 /* client_set_privs(struct Client* client)
@@ -225,6 +227,8 @@
       if (IsLocOp(client))
         PrivSet(&cli_privs(client), feattab[i].priv);
       continue;
+    default:
+      continue;  /* ?? */
     }
   }
 
Index: ircu2.10/ircd/gline.c
diff -u ircu2.10/ircd/gline.c:1.41 ircu2.10/ircd/gline.c:1.42
--- ircu2.10/ircd/gline.c:1.41  Tue Jan  7 02:06:42 2003
+++ ircu2.10/ircd/gline.c       Sat Jan 11 04:49:26 2003
@@ -17,7 +17,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: gline.c,v 1.41 2003/01/07 10:06:42 a1kmm Exp $
+ * $Id: gline.c,v 1.42 2003/01/11 12:49:26 bleepster Exp $
  */
 #include "config.h"
 
@@ -132,15 +132,15 @@
     DupString(gline->gl_host, host);
 
     if (check_if_ipmask(host)) { /* mark if it's an IP mask */
-      int class;
+      int c_class;
       char ipname[16];
       int ad[4] = { 0 };
       int bits2 = 0;
        
-      class = sscanf(host,"%d.%d.%d.%d/%d",
+      c_class = sscanf(host,"%d.%d.%d.%d/%d",
                      &ad[0],&ad[1],&ad[2],&ad[3], &bits2);
-      if (class!=5) {
-        gline->bits=class*8;
+      if (c_class!=5) {
+        gline->bits=c_class*8;
       }
       else {
         gline->bits=bits2;
Index: ircu2.10/ircd/ircd_alloc.c
diff -u ircu2.10/ircd/ircd_alloc.c:1.5 ircu2.10/ircd/ircd_alloc.c:1.6
--- ircu2.10/ircd/ircd_alloc.c:1.5      Sun Jun 30 21:51:28 2002
+++ ircu2.10/ircd/ircd_alloc.c  Sat Jan 11 04:49:26 2003
@@ -19,7 +19,7 @@
  *   along with this program; if not, write to the Free Software
  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- *   $Id: ircd_alloc.c,v 1.5 2002/07/01 04:51:28 a1kmm Exp $
+ *   $Id: ircd_alloc.c,v 1.6 2003/01/11 12:49:26 bleepster Exp $
  */
 #include "config.h"
 
@@ -28,6 +28,7 @@
 #include "s_debug.h"
 
 #include <assert.h>
+#include <string.h>
 
 static void nomem_handler(void);
 
@@ -51,3 +52,22 @@
 {
   noMemHandler = handler;
 }
+
+void* DoMalloc(size_t size, const char* x, const char* y, int z)
+{
+  void* t = malloc(size);
+  if (!t)
+    (*noMemHandler)();
+  return t;
+}
+
+void* DoMallocZero(size_t size, const char* x, const char* y, int z)
+{
+  void* t = malloc(size);
+  if (!t)
+    (*noMemHandler)();
+  memset(t, 0, size);
+  return t;
+}
+
+
Index: ircu2.10/ircd/ircd_events.c
diff -u ircu2.10/ircd/ircd_events.c:1.4 ircu2.10/ircd/ircd_events.c:1.5
--- ircu2.10/ircd/ircd_events.c:1.4     Wed Feb 13 16:20:42 2002
+++ ircu2.10/ircd/ircd_events.c Sat Jan 11 04:49:26 2003
@@ -16,7 +16,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: ircd_events.c,v 1.4 2002/02/14 00:20:42 ghostwolf Exp $
+ * $Id: ircd_events.c,v 1.5 2003/01/11 12:49:26 bleepster Exp $
  */
 #include "config.h"
 
@@ -663,7 +663,7 @@
 
 #define NM(name)       { #name, name }
 
-#define NE             { 0, 0 }
+#define NE             { 0 }
 
 const char*
 state_to_name(enum SocketState state)
Index: ircu2.10/ircd/ircd_log.c
diff -u ircu2.10/ircd/ircd_log.c:1.14 ircu2.10/ircd/ircd_log.c:1.15
--- ircu2.10/ircd/ircd_log.c:1.14       Tue Jan  7 02:06:42 2003
+++ ircu2.10/ircd/ircd_log.c    Sat Jan 11 04:49:26 2003
@@ -20,7 +20,7 @@
  *   along with this program; if not, write to the Free Software
  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- *   $Id: ircd_log.c,v 1.14 2003/01/07 10:06:42 a1kmm Exp $
+ *   $Id: ircd_log.c,v 1.15 2003/01/11 12:49:26 bleepster Exp $
  */
 #include "config.h"
 
@@ -235,7 +235,7 @@
 void
 log_debug_init(int usetty)
 {
-  logInfo.dbfile = MyMalloc(sizeof(struct LogFile));
+  logInfo.dbfile = (struct LogFile*) MyMalloc(sizeof(struct LogFile));
 
   logInfo.dbfile->next = 0; /* initialize debugging filename */
   logInfo.dbfile->prev_p = 0;
@@ -418,7 +418,7 @@
     vector[0].iov_base = timebuf;
     vector[1].iov_base = buf;
 
-    vector[2].iov_base = "\n"; /* terminate lines with a \n */
+    vector[2].iov_base = (void*) "\n"; /* terminate lines with a \n */
     vector[2].iov_len = 1;
 
     /* write it out to the log file */
@@ -469,7 +469,7 @@
     tmp = logInfo.freelist;
     logInfo.freelist = tmp->next;
   } else /* allocate a new one */
-    tmp = MyMalloc(sizeof(struct LogFile));
+    tmp = (struct LogFile*) MyMalloc(sizeof(struct LogFile));
 
   tmp->fd = -1; /* initialize the structure */
   tmp->ref = 1;
Index: ircu2.10/ircd/ircd_parser.y
diff -u ircu2.10/ircd/ircd_parser.y:1.8 ircu2.10/ircd/ircd_parser.y:1.9
--- ircu2.10/ircd/ircd_parser.y:1.8     Tue Jan  7 02:06:42 2003
+++ ircu2.10/ircd/ircd_parser.y Sat Jan 11 04:49:26 2003
@@ -17,7 +17,7 @@
  *  along with this program; if not, write to the Free Software
  *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
  *  USA.
- * $Id: ircd_parser.y,v 1.8 2003/01/07 10:06:42 a1kmm Exp $
+ * $Id: ircd_parser.y,v 1.9 2003/01/11 12:49:26 bleepster Exp $
  */
 %{
 
@@ -55,6 +55,7 @@
 #include "support.h"
 #include "sys.h"
 #include <stdlib.h>
+#include <stdio.h>
 #include <string.h>
 #include <arpa/inet.h>
 #define MAX_STRINGS 80 /* Maximum number of feature params. */
@@ -71,7 +72,7 @@
   int stringno;
   char *name, *pass, *host;
   char *stringlist[MAX_STRINGS];
-  struct ConnectionClass *class;
+  struct ConnectionClass *c_class;
   struct ConfItem *aconf;
   struct DenyConf *dconf;
   struct ServerConf *sconf;
@@ -352,11 +353,11 @@
 connectblock: CONNECT
 {
  name = pass = host = NULL;
- class = NULL;
+ c_class = NULL;
  port = 0;
 } '{' connectitems '}'
 {
- if (name != NULL && pass != NULL && host != NULL && class != NULL && 
+ if (name != NULL && pass != NULL && host != NULL && c_class != NULL && 
      /*ccount < MAXCONFLINKS &&*/ !strchr(host, '*') &&
      !strchr(host, '?'))
  {
@@ -364,7 +365,7 @@
    aconf->status = CONF_SERVER;
    aconf->name = name;
    aconf->passwd = pass;
-   aconf->conn_class = class;
+   aconf->conn_class = c_class;
    aconf->port = port;
    aconf->status = CONF_SERVER;
    aconf->host = host;
@@ -396,7 +397,7 @@
 };
 connectclass: CLASS '=' QSTRING ';'
 {
- class = find_class(yylval.text);
+ c_class = find_class(yylval.text);
 };
 connecthost: HOST '=' QSTRING ';'
 {
@@ -410,7 +411,7 @@
 
 serverblock: SERVER
 {
- aconf = MyMalloc(sizeof(*aconf));
+ aconf = (struct ConfItem*) MyMalloc(sizeof(*aconf));
  memset(aconf, 0, sizeof(*aconf));
 } '{' serveritems '}'
 {
@@ -472,7 +473,7 @@
 
 operblock: OPER
 {
-  aconf = MyMalloc(sizeof(*aconf));
+  aconf = (struct ConfItem*) MyMalloc(sizeof(*aconf));
   memset(aconf, 0, sizeof(*aconf));
   aconf->status = CONF_OPERATOR;
 } '{' operitems '}' ';'
@@ -524,7 +525,7 @@
  if (!strchr(yylval.text, '@'))
  {
    int uh_len;
-   char *b = MyMalloc((uh_len = strlen(yylval.text)+3));
+   char *b = (char*) MyMalloc((uh_len = strlen(yylval.text)+3));
    ircd_snprintf(0, b, uh_len, "*@%s", yylval.text);
    aconf->host = b;
  }
@@ -640,7 +641,7 @@
 
 clientblock: CLIENT
 {
-  aconf = MyMalloc(sizeof(*aconf));
+  aconf = (struct ConfItem*) MyMalloc(sizeof(*aconf));
   memset(aconf, 0, sizeof(*aconf));
   aconf->status = CONF_CLIENT;
 } '{' clientitems '}'
@@ -692,7 +693,7 @@
 
 killblock: KILL
 {
-  dconf = MyMalloc(sizeof(*dconf));
+  dconf = (struct DenyConf*) MyMalloc(sizeof(*dconf));
   memset(dconf, 0, sizeof(*dconf));
 } '{' killitems '}'
 {
@@ -785,7 +786,7 @@
   struct CRuleNode *node;
   if (host != NULL && pass != NULL && (node=crule_parse(pass)) != NULL)
   {
-    struct CRuleConf *p = MyMalloc(sizeof(*p));
+    struct CRuleConf *p = (struct CRuleConf*) MyMalloc(sizeof(*p));
     p->hostmask = host;
     p->rule = pass;
     p->type = tconn;
@@ -875,7 +876,7 @@
 quarantineblock: QUARANTINE '{'
 {
   if (qconf != NULL)
-    qconf = MyMalloc(sizeof(*qconf));
+    qconf = (struct qline*) MyMalloc(sizeof(*qconf));
   else
   {
     if (qconf->chname != NULL)
@@ -890,7 +891,7 @@
   {
     log_write(LS_CONFIG, L_ERROR, 0, "quarantine blocks need a channel name "
               "and a reason.");
-    return;
+    return 0;
   }
   qconf->next = GlobalQuarantineList;
   GlobalQuarantineList = qconf;
Index: ircu2.10/ircd/ircd_snprintf.c
diff -u ircu2.10/ircd/ircd_snprintf.c:1.13 ircu2.10/ircd/ircd_snprintf.c:1.14
--- ircu2.10/ircd/ircd_snprintf.c:1.13  Tue Jan  7 02:06:42 2003
+++ ircu2.10/ircd/ircd_snprintf.c       Sat Jan 11 04:49:26 2003
@@ -16,7 +16,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: ircd_snprintf.c,v 1.13 2003/01/07 10:06:42 a1kmm Exp $
+ * $Id: ircd_snprintf.c,v 1.14 2003/01/11 12:49:26 bleepster Exp $
  */
 #include "config.h"
 
@@ -2010,7 +2010,7 @@
       vdata->vd_overflow = SNP_MAX(buf_s.buf_overflow, buf_s.overflow);
     } else if ((fld_s.flags & CONV_MASK) == CONV_CLIENT) {
       struct Client *cptr = (struct Client*) fld_s.value.v_ptr;
-      char *str1 = 0, *str2 = 0, *str3 = 0;
+      const char *str1 = 0, *str2 = 0, *str3 = 0;
       int slen1 = 0, slen2 = 0, slen3 = 0, elen = 0, plen = 0;
 
       /* &me is used if it's not a definite server */
Index: ircu2.10/ircd/listener.c
diff -u ircu2.10/ircd/listener.c:1.19 ircu2.10/ircd/listener.c:1.20
--- ircu2.10/ircd/listener.c:1.19       Tue Jan  7 02:06:41 2003
+++ ircu2.10/ircd/listener.c    Sat Jan 11 04:49:26 2003
@@ -16,7 +16,7 @@
  *   along with this program; if not, write to the Free Software
  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- *  $Id: listener.c,v 1.19 2003/01/07 10:06:41 a1kmm Exp $
+ *  $Id: listener.c,v 1.20 2003/01/11 12:49:26 bleepster Exp $
  */
 #include "config.h"
 
@@ -432,7 +432,7 @@
   assert(0 != ev_socket(ev));
   assert(0 != s_data(ev_socket(ev)));
 
-  listener = s_data(ev_socket(ev));
+  listener = (struct Listener*) s_data(ev_socket(ev));
 
   if (ev_type(ev) == ET_DESTROY) /* being destroyed */
     free_listener(listener);
Index: ircu2.10/ircd/m_nick.c
diff -u ircu2.10/ircd/m_nick.c:1.20 ircu2.10/ircd/m_nick.c:1.21
--- ircu2.10/ircd/m_nick.c:1.20 Tue Jan  7 19:17:19 2003
+++ ircu2.10/ircd/m_nick.c      Sat Jan 11 04:49:26 2003
@@ -20,7 +20,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: m_nick.c,v 1.20 2003/01/08 03:17:19 klmitch Exp $
+ * $Id: m_nick.c,v 1.21 2003/01/11 12:49:26 bleepster Exp $
  */
 
 /*
@@ -284,7 +284,7 @@
   char nick[NICKLEN + 2];
   time_t lastnick = 0;
   int differ = 1;
-  char *type;
+  const char *type;
 
   assert(0 != cptr);
   assert(0 != sptr);
Index: ircu2.10/ircd/m_opmode.c
diff -u ircu2.10/ircd/m_opmode.c:1.13 ircu2.10/ircd/m_opmode.c:1.14
--- ircu2.10/ircd/m_opmode.c:1.13       Tue Jan  7 19:17:19 2003
+++ ircu2.10/ircd/m_opmode.c    Sat Jan 11 04:49:26 2003
@@ -21,7 +21,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: m_opmode.c,v 1.13 2003/01/08 03:17:19 klmitch Exp $
+ * $Id: m_opmode.c,v 1.14 2003/01/11 12:49:26 bleepster Exp $
  */
 
 /*
@@ -93,6 +93,7 @@
 #include "numeric.h"
 #include "numnicks.h"
 #include "send.h"
+#include "s_conf.h"
 
 #include <assert.h>
 
@@ -138,7 +139,8 @@
 {
   struct Channel *chptr = 0;
   struct ModeBuf mbuf;
-  char *chname, *qreason;
+  char *chname;
+  const char *qreason;
   int force = 0;
   struct Membership *member;
 
Index: ircu2.10/ircd/m_whois.c
diff -u ircu2.10/ircd/m_whois.c:1.26 ircu2.10/ircd/m_whois.c:1.27
--- ircu2.10/ircd/m_whois.c:1.26        Tue Jan  7 19:17:19 2003
+++ ircu2.10/ircd/m_whois.c     Sat Jan 11 04:49:26 2003
@@ -20,7 +20,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: m_whois.c,v 1.26 2003/01/08 03:17:19 klmitch Exp $
+ * $Id: m_whois.c,v 1.27 2003/01/11 12:49:26 bleepster Exp $
  */
 
 /*
@@ -227,7 +227,7 @@
 {
   struct Client *acptr; /* Current client we're concidering */
   struct User *user;   /* the user portion of the client */
-  char *name;          /* the name of this client */
+  const char *name;    /* the name of this client */
   struct Membership* chan; 
   int invis;           /* does +i apply? */
   int member;          /* Is this user on any channels? */
Index: ircu2.10/ircd/motd.c
diff -u ircu2.10/ircd/motd.c:1.14 ircu2.10/ircd/motd.c:1.15
--- ircu2.10/ircd/motd.c:1.14   Tue Jan  7 02:06:38 2003
+++ ircu2.10/ircd/motd.c        Sat Jan 11 04:49:27 2003
@@ -21,7 +21,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: motd.c,v 1.14 2003/01/07 10:06:38 a1kmm Exp $
+ * $Id: motd.c,v 1.15 2003/01/11 12:49:27 bleepster Exp $
  */
 #include "config.h"
 
@@ -219,22 +219,22 @@
 motd_lookup(struct Client *cptr)
 {
   struct Motd *ptr;
-  char *class = NULL;
+  char *c_class = NULL;
 
   assert(0 != cptr);
 
   if (!MyUser(cptr)) /* not my user, always return remote motd */
     return MotdList.remote;
 
-  class = get_client_class(cptr);
+  c_class = get_client_class(cptr);
 
   /* check the motd blocks first */
   for (ptr = MotdList.other; ptr; ptr = ptr->next)
   {
     if (ptr->type == MOTD_CLASS &&
-        !match(ptr->hostmask, class))
+        !match(ptr->hostmask, c_class))
       return ptr;
-    else if (ptr->type == MOTD_HOSTMASK && class != NULL &&
+    else if (ptr->type == MOTD_HOSTMASK && c_class != NULL &&
              !match(ptr->hostmask, cli_sockhost(cptr)))
       return ptr;
   }
Index: ircu2.10/ircd/s_auth.c
diff -u ircu2.10/ircd/s_auth.c:1.24 ircu2.10/ircd/s_auth.c:1.25
--- ircu2.10/ircd/s_auth.c:1.24 Fri Jan 10 21:46:51 2003
+++ ircu2.10/ircd/s_auth.c      Sat Jan 11 04:49:27 2003
@@ -16,7 +16,7 @@
  *   along with this program; if not, write to the Free Software
  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- *   $Id: s_auth.c,v 1.24 2003/01/11 05:46:51 bleepster Exp $
+ *   $Id: s_auth.c,v 1.25 2003/01/11 12:49:27 bleepster Exp $
  *
  * Changes:
  *   July 6, 1999 - Rewrote most of the code here. When a client connects
@@ -138,7 +138,7 @@
   assert(0 != ev_timer(ev));
   assert(0 != t_data(ev_timer(ev)));
 
-  auth = t_data(ev_timer(ev));
+  auth = (struct AuthRequest*) t_data(ev_timer(ev));
 
   if (ev_type(ev) == ET_DESTROY) { /* being destroyed */
     auth->flags &= ~AM_TIMEOUT;
@@ -165,7 +165,7 @@
   assert(0 != ev_socket(ev));
   assert(0 != s_data(ev_socket(ev)));
 
-  auth = s_data(ev_socket(ev));
+  auth = (struct AuthRequest*) s_data(ev_socket(ev));
 
   switch (ev_type(ev)) {
   case ET_DESTROY: /* being destroyed */
Index: ircu2.10/ircd/s_bsd.c
diff -u ircu2.10/ircd/s_bsd.c:1.56 ircu2.10/ircd/s_bsd.c:1.57
--- ircu2.10/ircd/s_bsd.c:1.56  Fri Jan 10 21:46:51 2003
+++ ircu2.10/ircd/s_bsd.c       Sat Jan 11 04:49:27 2003
@@ -17,7 +17,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: s_bsd.c,v 1.56 2003/01/11 05:46:51 bleepster Exp $
+ * $Id: s_bsd.c,v 1.57 2003/01/11 12:49:27 bleepster Exp $
  */
 #include "config.h"
 
@@ -983,7 +983,7 @@
   assert(0 != ev_socket(ev));
   assert(0 != s_data(ev_socket(ev)));
 
-  con = s_data(ev_socket(ev));
+  con = (struct Connection*) s_data(ev_socket(ev));
 
   assert(0 != con_client(con) || ev_type(ev) == ET_DESTROY);
 
@@ -1071,7 +1071,7 @@
   assert(0 != t_data(ev_timer(ev)));
   assert(ET_DESTROY == ev_type(ev) || ET_EXPIRE == ev_type(ev));
 
-  con = t_data(ev_timer(ev));
+  con = (struct Connection*) t_data(ev_timer(ev));
 
   assert(0 != con_client(con) || ev_type(ev) == ET_DESTROY);
 
Index: ircu2.10/ircd/uping.c
diff -u ircu2.10/ircd/uping.c:1.14 ircu2.10/ircd/uping.c:1.15
--- ircu2.10/ircd/uping.c:1.14  Wed Feb 13 16:20:45 2002
+++ ircu2.10/ircd/uping.c       Sat Jan 11 04:49:27 2003
@@ -16,7 +16,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: uping.c,v 1.14 2002/02/14 00:20:45 ghostwolf Exp $
+ * $Id: uping.c,v 1.15 2003/01/11 12:49:27 bleepster Exp $
  */
 #include "config.h"
 
@@ -193,7 +193,7 @@
   assert(0 != ev_socket(ev));
   assert(0 != s_data(ev_socket(ev)));
 
-  pptr = s_data(ev_socket(ev));
+  pptr = (struct UPing*) s_data(ev_socket(ev));
 
   Debug((DEBUG_SEND, "uping_read_callback called, %p (%d)", pptr,
         ev_type(ev)));
@@ -218,7 +218,7 @@
   assert(0 != ev_timer(ev));
   assert(0 != t_data(ev_timer(ev)));
 
-  pptr = t_data(ev_timer(ev));
+  pptr = (struct UPing*) t_data(ev_timer(ev));
 
   Debug((DEBUG_SEND, "uping_sender_callback called, %p (%d)", pptr,
         ev_type(ev)));
@@ -247,7 +247,7 @@
   assert(0 != ev_timer(ev));
   assert(0 != t_data(ev_timer(ev)));
 
-  pptr = t_data(ev_timer(ev));
+  pptr = (struct UPing*) t_data(ev_timer(ev));
 
   Debug((DEBUG_SEND, "uping_killer_callback called, %p (%d)", pptr,
         ev_type(ev)));
----------------------- End of diff -----------------------

Reply via email to