[cvslog] (2003-04-17 01:56:08 UTC) Module eggdrop1.6: Change committed

cvslog cvs at tsss.org
Wed Apr 16 19:56:08 CST 2003


CVSROOT    : /usr/local/cvsroot
Module     : eggdrop1.6
Commit time: 2003-04-17 01:56:07 UTC
Commited by: Will Buckner <wcc at techmonkeys.org>

Modified files:
     src/botnet.c src/cmds.c src/dcc.c src/eggdrop.h src/main.c
     src/main.h src/modules.c src/net.c src/patch.h src/proto.h
     src/tcl.c src/tcldcc.c src/tclmisc.c src/mod/module.h
     src/mod/dns.mod/dns.c src/mod/filesys.mod/filesys.c
     src/mod/server.mod/server.c src/mod/server.mod/servmsg.c
     src/mod/share.mod/share.c src/mod/transfer.mod/transfer.c

Log message:

* IPv6 indenting.
* Misc IPv6 fixes.

---------------------- diff included ----------------------
Index: eggdrop1.6/src/botnet.c
diff -u eggdrop1.6/src/botnet.c:1.51 eggdrop1.6/src/botnet.c:1.52
--- eggdrop1.6/src/botnet.c:1.51	Mon Mar 31 23:33:40 2003
+++ eggdrop1.6/src/botnet.c	Wed Apr 16 20:55:57 2003
@@ -7,7 +7,7 @@
  *   linking, unlinking, and relaying to another bot
  *   pinging the bots periodically and checking leaf status
  *
- * $Id: botnet.c,v 1.51 2003/04/01 05:33:40 wcc Exp $
+ * $Id: botnet.c,v 1.52 2003/04/17 01:55:57 wcc Exp $
  */
 /*
  * Copyright (C) 1997 Robey Pointer
@@ -1058,7 +1058,7 @@
   dcc[i].sock = getsock(SOCK_STRONGCONN, getprotocol(dcc[i].host));
 #else
   dcc[i].sock = getsock(SOCK_STRONGCONN);
-#endif
+#endif /* USE_IPV6 */
   nfree(linker);
   if (dcc[i].sock < 0 ||
       open_telnet_raw(dcc[i].sock, iptostr(htonl(dcc[i].addr)),
@@ -1098,7 +1098,7 @@
   dcc[idx].sock = getsock(SOCK_STRONGCONN, getprotocol(dcc[idx].host));
 #else
   dcc[idx].sock = getsock(SOCK_STRONGCONN);
-#endif
+#endif /* USE_IPV6 */
   dcc[uidx].u.relay->sock = dcc[idx].sock;
   dcc[idx].port++;
   dcc[idx].timeval = now;
@@ -1148,7 +1148,7 @@
   dcc[i].sock = getsock(SOCK_STRONGCONN | SOCK_VIRTUAL, getprotocol(bi->address));
 #else
   dcc[i].sock = getsock(SOCK_STRONGCONN | SOCK_VIRTUAL);
-#endif
+#endif /* USE_IPV6 */
   if (dcc[i].sock < 0) {
     lostdcc(i);
     dprintf(idx, "%s\n", MISC_NOFREESOCK);
Index: eggdrop1.6/src/cmds.c
diff -u eggdrop1.6/src/cmds.c:1.97 eggdrop1.6/src/cmds.c:1.98
--- eggdrop1.6/src/cmds.c:1.97	Mon Mar 31 23:33:40 2003
+++ eggdrop1.6/src/cmds.c	Wed Apr 16 20:55:57 2003
@@ -3,7 +3,7 @@
  *   commands from a user via dcc
  *   (split in 2, this portion contains no-irc commands)
  *
- * $Id: cmds.c,v 1.97 2003/04/01 05:33:40 wcc Exp $
+ * $Id: cmds.c,v 1.98 2003/04/17 01:55:57 wcc Exp $
  */
 /*
  * Copyright (C) 1997 Robey Pointer
@@ -947,7 +947,11 @@
 static void cmd_chaddr(struct userrec *u, int idx, char *par)
 {
   int telnet_port = 3333, relay_port = 3333;
+#ifdef USE_IPV6
   char *handle, *addr, *p, *q, *r;
+#else
+  char *handle, *addr, *p, *q;
+#endif /* USE_IPV6 */
   struct bot_addr *bi;
   struct userrec *u1;
 
@@ -987,6 +991,7 @@
     bi->telnet_port = telnet_port;
     bi->relay_port = relay_port;
   } else {
+#ifdef USE_IPV6
     r = strchr(addr, '[');
     if (r) { /* ipv6 notation [3ffe:80c0:225::] */
       *addr++;
@@ -1011,25 +1016,7 @@
       }
     }
   }
-/*
-  q = strchr(addr, ':');
-  if (!q) {
-    bi->address = user_malloc(strlen(addr) + 1);
-    strcpy(bi->address, addr);
-    bi->telnet_port = telnet_port;
-    bi->relay_port = relay_port;
-  } else {
-    bi->address = user_malloc(q - addr + 1);
-    strncpyz(bi->address, addr, q - addr + 1);
-    p = q + 1;
-    bi->telnet_port = atoi(p);
-    q = strchr(p, '/');
-    if (!q)
-      bi->relay_port = bi->telnet_port;
-    else
-      bi->relay_port = atoi(q + 1);
-  }
-*/
+#endif /* USE_IPV6 */
   set_user(&USERENTRY_BOTADDR, u1, bi);
 }
 
Index: eggdrop1.6/src/dcc.c
diff -u eggdrop1.6/src/dcc.c:1.66 eggdrop1.6/src/dcc.c:1.67
--- eggdrop1.6/src/dcc.c:1.66	Mon Mar 31 23:33:40 2003
+++ eggdrop1.6/src/dcc.c	Wed Apr 16 20:55:57 2003
@@ -4,7 +4,7 @@
  *   disconnect on a dcc socket
  *   ...and that's it!  (but it's a LOT)
  *
- * $Id: dcc.c,v 1.66 2003/04/01 05:33:40 wcc Exp $
+ * $Id: dcc.c,v 1.67 2003/04/17 01:55:57 wcc Exp $
  */
 /*
  * Copyright (C) 1997 Robey Pointer
@@ -238,7 +238,7 @@
   dcc[idx].sock = getsock(SOCK_STRONGCONN, getprotocol(dcc[idx].host));
 #else
   dcc[idx].sock = getsock(SOCK_STRONGCONN);
-#endif
+#endif /* USE_IPV6 */
   dcc[idx].port++;
   dcc[idx].timeval = now;
   if (dcc[idx].sock < 0 ||
Index: eggdrop1.6/src/eggdrop.h
diff -u eggdrop1.6/src/eggdrop.h:1.46 eggdrop1.6/src/eggdrop.h:1.47
--- eggdrop1.6/src/eggdrop.h:1.46	Mon Mar 31 23:33:40 2003
+++ eggdrop1.6/src/eggdrop.h	Wed Apr 16 20:55:57 2003
@@ -4,7 +4,7 @@
  *
  *   IF YOU ALTER THIS FILE, YOU NEED TO RECOMPILE THE BOT.
  *
- * $Id: eggdrop.h,v 1.46 2003/04/01 05:33:40 wcc Exp $
+ * $Id: eggdrop.h,v 1.47 2003/04/17 01:55:57 wcc Exp $
  */
 /*
  * Copyright (C) 1997 Robey Pointer
@@ -282,22 +282,19 @@
 struct userrec;
 
 struct dcc_t {
-  long sock;                    /* This should be a long to keep 64-bit
-                                 * machines sane                         */
-  IP addr;                      /* IP address in host byte order         */
+  long sock;                    /* This should be a long to keep 64-bit machines sane */
+  IP addr;                      /* IP address in host byte order */
 #ifdef USE_IPV6
-  char addr6[121];		/* easier.. ipv6 address in regular notation (3ffe:80c0:225::) */
-  int af_type;			/* AF_INET or AF_INET6 */
-#endif
+  char addr6[121];              /* easier.. ipv6 address in regular notation (3ffe:80c0:225::) */
+  int af_type;                  /* AF_INET or AF_INET6 */
+#endif /* USE_IPV6 */
   unsigned int port;
   struct userrec *user;
   char nick[NICKLEN];
   char host[UHOSTLEN];
   struct dcc_table *type;
-  time_t timeval;               /* Use for any timing stuff
-                                 * - this is used for timeout checking  */
-  unsigned long status;         /* A LOT of dcc types have status
-                                 * thingos, this makes it more avaliabe */
+  time_t timeval;               /* This is used for timeout checking  */
+  unsigned long status;         /* A LOT of dcc types have status things; makes it more avaliabe */
   union {
     struct chat_info *chat;
     struct file_info *file;
@@ -606,7 +603,7 @@
   unsigned long inbuflen;       /* Inbuf could be binary data   */
 #ifdef USE_IPV6
   unsigned int af;
-#endif
+#endif /* USE_IPV6 */
 } sock_list;
 
 enum {
Index: eggdrop1.6/src/main.c
diff -u eggdrop1.6/src/main.c:1.96 eggdrop1.6/src/main.c:1.97
--- eggdrop1.6/src/main.c:1.96	Mon Mar 31 23:33:40 2003
+++ eggdrop1.6/src/main.c	Wed Apr 16 20:55:57 2003
@@ -5,7 +5,7 @@
  *   command line arguments
  *   context and assert debugging
  *
- * $Id: main.c,v 1.96 2003/04/01 05:33:40 wcc Exp $
+ * $Id: main.c,v 1.97 2003/04/17 01:55:57 wcc Exp $
  */
 /*
  * Copyright (C) 1997 Robey Pointer
@@ -245,7 +245,7 @@
     setsock(x, SOCK_NONSOCK, AF_INET);
 #else
     setsock(x, SOCK_NONSOCK);
-#endif
+#endif /* USE_IPV6 */
     if (x >= 0) {
       strncpyz(s, ctime(&now), sizeof s);
       dprintf(-x, "Debug (%s) written %s\n", ver, s);
@@ -274,7 +274,7 @@
   setsock(x, SOCK_NONSOCK, AF_INET);
 #else
   setsock(x, SOCK_NONSOCK);
-#endif
+#endif /* USE_IPV6 */
   if (x < 0) {
     putlog(LOG_MISC, "*", "* Failed to write DEBUG");
   } else {
@@ -918,7 +918,7 @@
     setsock(STDOUT, 0, AF_INET); /* Entry in net table */
 #else
     setsock(STDOUT, 0);          /* Entry in net table */
-#endif
+#endif /* USE_IPV6 */
     dprintf(n, "\n### ENTERING DCC CHAT SIMULATION ###\n\n");
     dcc_chatter(n);
   }
@@ -949,7 +949,7 @@
 #ifdef USE_TCL_EVENTS
     /* Process a single tcl event */
     Tcl_DoOneEvent(TCL_ALL_EVENTS | TCL_DONT_WAIT);
-#endif				/* USE_TCL_EVENTS */
+#endif /* USE_TCL_EVENTS */
 
     /* Lets move some of this here, reducing the numer of actual
      * calls to periodic_timers
Index: eggdrop1.6/src/main.h
diff -u eggdrop1.6/src/main.h:1.24 eggdrop1.6/src/main.h:1.25
--- eggdrop1.6/src/main.h:1.24	Fri Feb 28 02:17:44 2003
+++ eggdrop1.6/src/main.h	Wed Apr 16 20:55:57 2003
@@ -2,7 +2,7 @@
  * main.h
  *   include file to include most other include files
  *
- * $Id: main.h,v 1.24 2003/02/28 08:17:44 tothwolf Exp $
+ * $Id: main.h,v 1.25 2003/04/17 01:55:57 wcc Exp $
  */
 /*
  * Copyright (C) 1997 Robey Pointer
@@ -30,7 +30,7 @@
 #  include "config.h"
 #endif
 
-#include "lush.h"		/* We seem to need this everywhere... */
+#include "lush.h" /* We seem to need this everywhere... */
 
 #if (((TCL_MAJOR_VERSION == 7) && (TCL_MINOR_VERSION >= 5)) || (TCL_MAJOR_VERSION > 7))
 #  define USE_TCL_EVENTS
Index: eggdrop1.6/src/mod/dns.mod/dns.c
diff -u eggdrop1.6/src/mod/dns.mod/dns.c:1.32 eggdrop1.6/src/mod/dns.mod/dns.c:1.33
--- eggdrop1.6/src/mod/dns.mod/dns.c:1.32	Mon Mar 31 23:33:41 2003
+++ eggdrop1.6/src/mod/dns.mod/dns.c	Wed Apr 16 20:55:57 2003
@@ -4,7 +4,7 @@
  *
  * Written by Fabian Knittel <fknittel at gmx.de>
  *
- * $Id: dns.c,v 1.32 2003/04/01 05:33:41 wcc Exp $
+ * $Id: dns.c,v 1.33 2003/04/17 01:55:57 wcc Exp $
  */
 /*
  * Copyright (C) 1999, 2000, 2001, 2002, 2003 Eggheads Development Team
@@ -31,8 +31,8 @@
 
 /* No async IPv6 dns in 1.6 */
 #ifdef USE_IPV6
-  #include "You cannot use the dns module with IPv6, re-run make iconfig and disable the dns module!"
-#endif
+#  include "You cannot use the dns module with IPv6, re-run make iconfig and disable the dns module!"
+#endif /* USE_IPV6 */
 
 static void dns_event_success(struct resolve *rp, int type);
 static void dns_event_failure(struct resolve *rp, int type);
Index: eggdrop1.6/src/mod/filesys.mod/filesys.c
diff -u eggdrop1.6/src/mod/filesys.mod/filesys.c:1.60 eggdrop1.6/src/mod/filesys.mod/filesys.c:1.61
--- eggdrop1.6/src/mod/filesys.mod/filesys.c:1.60	Mon Mar 31 23:33:41 2003
+++ eggdrop1.6/src/mod/filesys.mod/filesys.c	Wed Apr 16 20:55:57 2003
@@ -2,7 +2,7 @@
  * filesys.c -- part of filesys.mod
  *   main file of the filesys eggdrop module
  *
- * $Id: filesys.c,v 1.60 2003/04/01 05:33:41 wcc Exp $
+ * $Id: filesys.c,v 1.61 2003/04/17 01:55:57 wcc Exp $
  */
 /*
  * Copyright (C) 1997 Robey Pointer
@@ -790,7 +790,7 @@
       dcc[i].sock = getsock(SOCK_BINARY, getprotocol(ip));
 #else
       dcc[i].sock = getsock(SOCK_BINARY);
-#endif
+#endif /* USE_IPV6 */
       if (dcc[i].sock < 0 || open_telnet_dcc(dcc[i].sock, ip, prt) < 0)
         dcc[i].type->eof(i);
     }
@@ -839,7 +839,7 @@
     sock = getsock(0, getprotocol(ip));
 #else
     sock = getsock(0);
-#endif
+#endif /* USE_IPV6 */
     if (sock < 0 || open_telnet_dcc(sock, ip, prt) < 0) {
       neterror(buf);
       if (!quiet_reject)
Index: eggdrop1.6/src/mod/module.h
diff -u eggdrop1.6/src/mod/module.h:1.74 eggdrop1.6/src/mod/module.h:1.75
--- eggdrop1.6/src/mod/module.h:1.74	Mon Mar 31 23:33:40 2003
+++ eggdrop1.6/src/mod/module.h	Wed Apr 16 20:55:57 2003
@@ -1,7 +1,7 @@
 /*
  * module.h
  *
- * $Id: module.h,v 1.74 2003/04/01 05:33:40 wcc Exp $
+ * $Id: module.h,v 1.75 2003/04/17 01:55:57 wcc Exp $
  */
 /*
  * Copyright (C) 1997 Robey Pointer
@@ -205,7 +205,7 @@
 #  define getsock ((int (*) (int,int))global[82])
 #else
 #  define getsock ((int (*) (int))global[82])
-#endif
+#endif /* USE_IPV6 */
 #define killsock ((void (*) (int))global[83])
 /* 84 - 87 */
 #define open_listen ((int (*) (int *))global[84])
Index: eggdrop1.6/src/mod/server.mod/server.c
diff -u eggdrop1.6/src/mod/server.mod/server.c:1.102 eggdrop1.6/src/mod/server.mod/server.c:1.103
--- eggdrop1.6/src/mod/server.mod/server.c:1.102	Wed Apr 16 16:25:16 2003
+++ eggdrop1.6/src/mod/server.mod/server.c	Wed Apr 16 20:55:57 2003
@@ -2,7 +2,7 @@
  * server.c -- part of server.mod
  *   basic irc server support
  *
- * $Id: server.c,v 1.102 2003/04/16 21:25:16 wcc Exp $
+ * $Id: server.c,v 1.103 2003/04/17 01:55:57 wcc Exp $
  */
 /*
  * Copyright (C) 1997 Robey Pointer
@@ -933,7 +933,12 @@
 static void add_server(char *ss)
 {
   struct server_list *x, *z;
+#ifdef USE_IPV6
   char *p, *q, *r;
+#else
+  char *p, *q;
+#endif /* USE_IPV6 */
+
   for (z = serverlist; z && z->next; z = z->next);
   while (ss) {
     p = strchr(ss, ',');
@@ -956,14 +961,16 @@
       x->name = nmalloc(strlen(ss) + 1);
       strcpy(x->name, ss);
     } else {
+#ifdef USE_IPV6
       if (ss[0] == '[') {
         *ss++;
         q = strchr(ss, ']');
         *q++ = 0; /* intentional */
         r = strchr(q, ':');
-	if (!r)
+        if (!r)
           x->port = default_port;
       }
+#endif /* USE_IPV6 */
       *q++ = 0;
       x->name = nmalloc(q - ss);
       strcpy(x->name, ss);
@@ -976,9 +983,13 @@
         x->pass = nmalloc(strlen(q) + 1);
         strcpy(x->pass, q);
       }
+#ifdef USE_IPV6
       if (!x->port) {
         x->port = atoi(ss);
       }
+#else
+      x->port = atoi(ss);
+#endif /* USE_IPV6 */
     }
     ss = p;
   }
@@ -1476,10 +1487,8 @@
               DCC_CONNECTFAILED1);
     putlog(LOG_MISC, "*", "%s: CHAT (%s!%s)", DCC_CONNECTFAILED3, nick, from);
   } else {
-#ifndef USE_IPV6 /* Don't bother.. */
     if (!sanitycheck_dcc(nick, from, ip, prt))
       return 1;
-#endif
     i = new_dcc(&DCC_DNSWAIT, sizeof(struct dns_info));
     if (i < 0) {
       putlog(LOG_MISC, "*", "DCC connection: CHAT (%s!%s)", dcc[i].nick, ip);
@@ -1492,11 +1501,11 @@
       debug1("ipv6 addr: %s",dcc[i].addr6);
       dcc[i].af_type = AF_INET6;
     } else {
-#endif
       dcc[i].addr = my_atoul(ip);
-#ifdef USE_IPV6
     }
-#endif
+#else
+    dcc[i].addr = my_atoul(ip);
+#endif /* USE_IPV6 */
     dcc[i].port = atoi(prt);
     dcc[i].sock = -1;
     strcpy(dcc[i].nick, u->handle);
@@ -1505,7 +1514,7 @@
     dcc[i].user = u;
 #ifdef USE_IPV6
     if (dcc[i].af_type != AF_INET6) {
-#endif
+#endif /* USE_IPV6 */
 /* remove me? */
       dcc[i].addr = my_atoul(ip);
       dcc[i].u.dns->ip = dcc[i].addr;
@@ -1517,7 +1526,7 @@
 #ifdef USE_IPV6
     } else
       dcc_chat_hostresolved(i); /* Don't try to look it up */
-#endif
+#endif /* USE_IPV6 */
   }
   return 1;
 }
@@ -1530,7 +1539,7 @@
   egg_snprintf(buf, sizeof buf, "%d", dcc[i].port);
 #ifndef USE_IPV6
   if (!hostsanitycheck_dcc(dcc[i].nick, dcc[i].host, dcc[i].addr,
-      dcc[i].u.dns->host, buf)) {
+                           dcc[i].u.dns->host, buf)) {
     lostdcc(i);
     return;
   }
@@ -1539,24 +1548,26 @@
     strcpy(ip,dcc[i].addr6); /* safe, addr6 is 121 */
     debug0("afinet6, af_type, strcpy");
   } else
-#endif
+#endif /* !USE_IPV6 */
     egg_snprintf(ip, sizeof ip, "%lu", iptolong(htonl(dcc[i].addr)));
 #ifdef USE_IPV6
   if (dcc[i].af_type == AF_INET6) {
-#ifdef IPV6_DEBUG
+#  ifdef IPV6_DEBUG
     debug2("af_inet6 %s / %s", dcc[i].addr6, ip);
-#endif
+#  endif /* IPV6_DEBUG */
     dcc[i].sock = getsock(0, AF_INET6);
   } else {
-#ifdef IPV6_DEBUG
+#  ifdef IPV6_DEBUG
     debug0("af_inet");
-#endif
+#  endif /* IPV6_DEBUG */
     dcc[i].sock = getsock(0, AF_INET);
   }
 #else
   dcc[i].sock = getsock(0);
+#  ifdef IPV6_DEBUG
   debug2("sock: %d %s", dcc[i].sock, ip);
-#endif
+#  endif /* IPV6_DEBUG */
+#endif /* USE_IPV6 */
   if (dcc[i].sock < 0 || open_telnet_dcc(dcc[i].sock, ip, buf) < 0) {
     neterror(buf);
     if (!quiet_reject)
Index: eggdrop1.6/src/mod/server.mod/servmsg.c
diff -u eggdrop1.6/src/mod/server.mod/servmsg.c:1.78 eggdrop1.6/src/mod/server.mod/servmsg.c:1.79
--- eggdrop1.6/src/mod/server.mod/servmsg.c:1.78	Mon Mar 31 23:33:41 2003
+++ eggdrop1.6/src/mod/server.mod/servmsg.c	Wed Apr 16 20:55:57 2003
@@ -1,7 +1,7 @@
 /*
  * servmsg.c -- part of server.mod
  *
- * $Id: servmsg.c,v 1.78 2003/04/01 05:33:41 wcc Exp $
+ * $Id: servmsg.c,v 1.79 2003/04/17 01:55:57 wcc Exp $
  */
 /*
  * Copyright (C) 1997 Robey Pointer
@@ -1206,7 +1206,7 @@
     server_resolve_success(servidx);
 #else
     dcc_dnsipbyhost(dcc[servidx].host);
-#endif
+#endif /* USE_IPV6 */
   }
 }
 
@@ -1232,7 +1232,7 @@
   serv = open_telnet(dcc[servidx].host, dcc[servidx].port);
 #else
   serv = open_telnet(iptostr(htonl(dcc[servidx].addr)), dcc[servidx].port);
-#endif
+#endif /* USE_IPV6 */
   if (serv < 0) {
     neterror(s);
     putlog(LOG_SERV, "*", "%s %s (%s)", IRC_FAILEDCONNECT, dcc[servidx].host,
Index: eggdrop1.6/src/mod/share.mod/share.c
diff -u eggdrop1.6/src/mod/share.mod/share.c:1.74 eggdrop1.6/src/mod/share.mod/share.c:1.75
--- eggdrop1.6/src/mod/share.mod/share.c:1.74	Mon Mar 31 23:33:41 2003
+++ eggdrop1.6/src/mod/share.mod/share.c	Wed Apr 16 20:55:57 2003
@@ -1,7 +1,7 @@
 /*
  * share.c -- part of share.mod
  *
- * $Id: share.c,v 1.74 2003/04/01 05:33:41 wcc Exp $
+ * $Id: share.c,v 1.75 2003/04/17 01:55:57 wcc Exp $
  */
 /*
  * Copyright (C) 1997 Robey Pointer
@@ -1132,7 +1132,7 @@
     sock = getsock(SOCK_BINARY, getprotocol(ip)); /* Don't buffer this -> mark binary. */
 #else
     sock = getsock(SOCK_BINARY); /* Don't buffer this -> mark binary. */
-#endif
+#endif /* USE_IPV6 */
     if (sock < 0 || open_telnet_dcc(sock, ip, port) < 0) {
       killsock(sock);
       putlog(LOG_BOTS, "*", "Asynchronous connection failed!");
Index: eggdrop1.6/src/mod/transfer.mod/transfer.c
diff -u eggdrop1.6/src/mod/transfer.mod/transfer.c:1.65 eggdrop1.6/src/mod/transfer.mod/transfer.c:1.66
--- eggdrop1.6/src/mod/transfer.mod/transfer.c:1.65	Mon Mar 31 23:33:41 2003
+++ eggdrop1.6/src/mod/transfer.mod/transfer.c	Wed Apr 16 20:55:57 2003
@@ -1,7 +1,7 @@
 /*
  * transfer.c -- part of transfer.mod
  *
- * $Id: transfer.c,v 1.65 2003/04/01 05:33:41 wcc Exp $
+ * $Id: transfer.c,v 1.66 2003/04/17 01:55:57 wcc Exp $
  *
  * Copyright (C) 1997 Robey Pointer
  * Copyright (C) 1999, 2000, 2001, 2002, 2003 Eggheads Development Team
@@ -996,7 +996,7 @@
       if ((zz = open_listen_by_af(&port, AF_INET6)) != -1) /* no idea how we want to handle this -poptix 02/03/03 */
 #else
       if ((zz = open_listen(&port)) != -1)
-#endif
+#endif /* USE_IPV6 */
         break;
   } else {
     port = reserved_port_min;
@@ -1004,7 +1004,7 @@
     zz = open_listen_by_af(&port, AF_INET6);
 #else
     zz = open_listen(&port);
-#endif
+#endif /* USE_IPV6 */
   }
 
   if (zz == -1)
Index: eggdrop1.6/src/modules.c
diff -u eggdrop1.6/src/modules.c:1.83 eggdrop1.6/src/modules.c:1.84
--- eggdrop1.6/src/modules.c:1.83	Mon Mar 31 23:33:40 2003
+++ eggdrop1.6/src/modules.c	Wed Apr 16 20:55:57 2003
@@ -4,7 +4,7 @@
  * 
  * by Darrin Smith (beldin at light.iinet.net.au)
  * 
- * $Id: modules.c,v 1.83 2003/04/01 05:33:40 wcc Exp $
+ * $Id: modules.c,v 1.84 2003/04/17 01:55:57 wcc Exp $
  */
 /* 
  * Copyright (C) 1997 Robey Pointer
@@ -76,7 +76,8 @@
             helpdir[], version[], quit_msg[], hostname6[];
 #else
             helpdir[], version[], quit_msg[];
-#endif
+#endif /* USE_IPV6 */
+
 extern int parties, noshare, dcc_total, egg_numver, userfile_perm, do_restart,
            ignore_time, must_be_owner, raw_log, max_dcc, make_userfile,
            default_flags, require_p, share_greet, use_invites, use_exempts,
@@ -673,7 +674,7 @@
   hand = (Tcl_PackageInitProc *) load(workbuf, LDR_NOFLAGS);
   if (hand == LDR_NULL_MODULE)
     return "Can't load module.";
-#      endif			/* USE_TCL_PACKAGE */
+#      endif /* USE_TCL_PACKAGE */
 #    else
   hand = dlopen(workbuf, DLFLAGS);
   if (!hand)
Index: eggdrop1.6/src/net.c
diff -u eggdrop1.6/src/net.c:1.56 eggdrop1.6/src/net.c:1.57
--- eggdrop1.6/src/net.c:1.56	Mon Mar 31 23:33:40 2003
+++ eggdrop1.6/src/net.c	Wed Apr 16 20:55:57 2003
@@ -2,7 +2,7 @@
  * net.c -- handles:
  *   all raw network i/o
  *
- * $Id: net.c,v 1.56 2003/04/01 05:33:40 wcc Exp $
+ * $Id: net.c,v 1.57 2003/04/17 01:55:57 wcc Exp $
  */
 /*
  * This is hereby released into the public domain.
@@ -46,7 +46,7 @@
 #ifdef USE_IPV6
 char myip6[121] = "";         /* IP can be specified in the config file       */
 char hostname6[121] = "";     /* Hostname can be specified in the config file */
-#endif
+#endif /* USE_IPV6 */
 
 char firewall[121] = "";      /* Socks server for firewall                    */
 int firewallport = 1080;      /* Default port of Sock4/5 firewalls            */
@@ -61,7 +61,7 @@
 struct hostent *myipv6he;
 char myipv6host[120];
 unsigned long notalloc = 0;
-#endif
+#endif /* USE_IPV6 */
 
 /* Types of proxy */
 #define PROXY_SOCKS   1
@@ -86,18 +86,18 @@
 {
 #ifdef USE_IPV6
   struct hostent *he;
-#ifndef HAVE_GETHOSTBYNAME2
+#  ifndef HAVE_GETHOSTBYNAME2
   int error_num;
-#endif
+#  endif /* !HAVE_GETHOSTBYNAME2 */
 
   if (!setjmp(alarmret)) {
     alarm(resolve_timeout);
 
-#ifdef HAVE_GETHOSTBYNAME2
+#  ifdef HAVE_GETHOSTBYNAME2
     he = gethostbyname2(host, AF_INET6);
-#else
+#  else
     he = getipnodebyname(host, AF_INET6, AI_DEFAULT, &error_num);
-#endif
+#  endif /* HAVE_GETHOSTBYNAME2 */
     alarm(0);
   } else
     he = NULL;
@@ -106,7 +106,7 @@
   return AF_INET6;
 #else
   return 0;
-#endif
+#endif /* USE_IPV6 */
 }
 
 /* Initialize the socklist
@@ -145,17 +145,17 @@
   struct in_addr *in;
 #if defined(USE_IPV6) && !defined(HAVE_GETHOSTBYNAME2)
   int error_num;
-#endif
+#endif /* USE_IPV6 && !HAVE_GETHOSTBYNAME2 */
 
 #ifdef USE_IPV6
   myipv6he = NULL;
   /* Could be pre-defined */
   if (myip6[0]) {
-#ifdef HAVE_GETHOSTBYNAME2
+#  ifdef HAVE_GETHOSTBYNAME2
     myipv6he = gethostbyname2(myip6, AF_INET6);
-#else
+#  else
     myipv6he = getipnodebyname(myip6, AF_INET6, AI_DEFAULT, &error_num);
-#endif
+#  endif /* !HAVE_GETHOSTBYNAME2 */
     if (myipv6he == NULL)
       fatal("Hostname IPV6 self-lookup failed.", 0);
   }
@@ -166,7 +166,7 @@
   }
   if (myipv6he != NULL)
     egg_inet_ntop(AF_INET6, &myipv6he, myipv6host, 119);
-#endif
+#endif /* USE_IPV6 */
   if (myip[0]) {
     if ((myip[strlen(myip) - 1] >= '0') && (myip[strlen(myip) - 1] <= '9'))
       return (IP) inet_addr(myip);
@@ -179,16 +179,16 @@
     hp = gethostbyname(s);
   }
 #ifdef USE_IPV6
-  if (hp == NULL && myipv6he==NULL)
+  if (hp == NULL && myipv6he == NULL)
 #else
   if (hp == NULL)
-#endif
+#endif /* USE_IPV6 */
     fatal("Hostname self-lookup failed. Please set 'my-ip' in the config "
           "file.", 0);
 #ifdef USE_IPV6
   if(hp == NULL)
     return 0;
-#endif
+#endif /* USE_IPV6 */
   in = (struct in_addr *) (hp->h_addr_list[0]);
   ip = (IP) (in->s_addr);
   return ip;
@@ -301,7 +301,7 @@
 int allocsock(int sock, int options, int af_ty)
 #else
 int allocsock(int sock, int options)
-#endif
+#endif /* USE_IPV6 */
 {
   int i;
 
@@ -314,7 +314,7 @@
       socklist[i].sock = sock;
 #ifdef USE_IPV6
       socklist[i].af = af_ty;
-#endif
+#endif /* USE_IPV6 */
       return i;
     }
   }
@@ -332,7 +332,7 @@
 void setsock(int sock, int options)
 {
   int i = allocsock(sock, options), parm;
-#endif
+#endif /* USE_IPV6 */
 
   if (((sock != STDOUT) || backgrd) && !(socklist[i].flags & SOCK_NONSOCK)) {
     parm = 1;
@@ -358,14 +358,14 @@
 int getsock(int options)
 {
   int sock = socket(AF_INET, SOCK_STREAM, 0);
-#endif
+#endif /* USE_IPV6 */
 
   if (sock >= 0)
 #ifdef USE_IPV6
     setsock(sock, options, af_def);
 #else
     setsock(sock, options);
-#endif
+#endif /* USE_IPV6 */
   else
     putlog(LOG_MISC, "*", "Warning: Can't create new socket!");
   return sock;
@@ -408,14 +408,14 @@
   int af_ty;
 #else
   unsigned char x[10];
-#endif
+#endif /* USE_IPV6 */
   struct hostent *hp;
   char s[256];
   int i;
 
 #ifdef USE_IPV6
   af_ty = getprotocol(host);
-#endif
+#endif /* USE_IPV6 */
   /* socks proxy */
   if (proxy == PROXY_SOCKS) {
     /* numeric IP? */
@@ -423,7 +423,7 @@
     if ((host[strlen(host) - 1] >= '0' && host[strlen(host) - 1] <= '9') && af_ty != AF_INET6) {
 #else
     if (host[strlen(host) - 1] >= '0' && host[strlen(host) - 1] <= '9') {
-#endif
+#endif /* USE_IPV6 */
       IP ip = ((IP) inet_addr(host)); /* drummer */
       egg_memcpy(x, &ip, 4);  /* Beige at Efnet */
     } else {
@@ -434,11 +434,11 @@
         if (af_ty == AF_INET6)
           hp = gethostbyname(host);
         else
-#endif
+#endif /* USE_IPV6 */
           hp = gethostbyname(host);
 #ifdef USE_IPV6
         alarm(0);
-#endif
+#endif /* USE_IPV6 */
       } else
         hp = NULL;
       if (hp == NULL) {
@@ -458,7 +458,7 @@
                    x[4], x[5], x[6], x[7], x[9], x[9], x[10], x[11],  x[12],
                    x[13], x[14], x[15], botuser);
     else
-#endif
+#endif /* USE_IPV6 */
       egg_snprintf(s, sizeof s, "\004\001%c%c%c%c%c%c%s", (port >> 8) % 256,
                    (port % 256), x[0], x[1], x[2], x[3], botuser);
     tputs(sock, s, strlen(botuser) + 9);        /* drummer */
@@ -483,7 +483,7 @@
   return AF_INET;
 #else
   return 0;
-#endif
+#endif /* USE_IPV6 */
 }
 
 
@@ -504,10 +504,10 @@
   struct sockaddr_in6 name6;
   unsigned long succ;
   int af_ty;
-#ifndef HAVE_GETHOSTBYNAME2
+#  ifndef HAVE_GETHOSTBYNAME2
   int error_num;
-#endif
-#endif
+#  endif /* !HAVE_GETHOSTBYNAME2 */
+#endif /* USE_IPV6 */
   struct hostent *hp;
   char host[121];
   int i, port, rc;
@@ -550,11 +550,11 @@
     name6.sin6_port = htons(port);
     if (!setjmp(alarmret)) {
       alarm(resolve_timeout);
-#ifdef HAVE_GETHOSTBYNAME2
+#  ifdef HAVE_GETHOSTBYNAME2
       hp = gethostbyname2(host, AF_INET6);
-#else
+#  else
       hp = getipnodebyname(host, AF_INET6, AI_DEFAULT, &error_num);
-#endif
+#  endif /* HAVE_GETHOSTBYNAME2 */
       alarm(0);
     } else
       hp = NULL;
@@ -564,11 +564,11 @@
     }
     egg_memcpy((char *) &name6.sin6_addr, hp->h_addr, hp->h_length);
     name6.sin6_family = hp->h_addrtype;
-#ifndef HAVE_GETHOSTBYNAME2
+#  ifndef HAVE_GETHOSTBYNAME2
     freehostent(myipv6he);
-#endif
+#  endif /* !HAVE_GETHOSTBYNAME2 */
   } else {
-#endif
+#endif /* USE_IPV6 */
     egg_bzero((char *) &name, sizeof(struct sockaddr_in));
 
     name.sin_family = AF_INET;
@@ -598,7 +598,7 @@
     }
 #ifdef USE_IPV6
   }
-#endif
+#endif /* USE_IPV6 */
   for (i = 0; i < MAXSOCKS; i++) {
     if (!(socklist[i].flags & SOCK_UNUSED) && (socklist[i].sock == sock))
       socklist[i].flags = (socklist[i].flags & ~SOCK_VIRTUAL) | SOCK_CONNECT;
@@ -608,7 +608,7 @@
     rc = connect(sock, (struct sockaddr *) &name6,
                  sizeof(struct sockaddr_in6));
   else
-#endif
+#endif /* USE_IPV6 */
     rc = connect(sock, (struct sockaddr *) &name,
                  sizeof(struct sockaddr_in));
   if (rc < 0) {    if (errno == EINPROGRESS) {
@@ -632,7 +632,7 @@
   int sock = getsock(0, getprotocol(server)), ret = open_telnet_raw(sock, server, port);
 #else
   int sock = getsock(0), ret = open_telnet_raw(sock, server, port);
-#endif
+#endif /* USE_IPV6 */
 
   if (ret < 0)
     killsock(sock);
@@ -648,14 +648,14 @@
 int open_address_listen(IP addr, int af_def, int *port)
 #else
 int open_address_listen(IP addr, int *port)
-#endif
+#endif /* USE_IPV6 */
  {
   int sock = 0;
   unsigned int addrlen;
 #ifdef USE_IPV6
   unsigned long ipp;
   struct sockaddr_in6 name6;
-#endif
+#endif /* USE_IPV6 */
   struct sockaddr_in name;
 
   if (firewall[0]) {
@@ -691,13 +691,13 @@
       }
     }
   } else {
-#endif
+#endif /* USE_IPV6 */
     if(getmyip() > 0) {
 #ifdef USE_IPV6
       sock = getsock(SOCK_LISTEN, AF_INET);
 #else
       sock = getsock(SOCK_LISTEN);
-#endif
+#endif /* USE_IPV6 */
       if (sock < 1)
         return -1;
 
@@ -707,7 +707,7 @@
       name.sin_addr.s_addr = addr;
       if (bind(sock, (struct sockaddr *) &name, sizeof(name)) < 0) {
         killsock(sock);
-	return -1;
+        return -1;
       }
       /* what port are we on? */
       addrlen = sizeof(name);
@@ -718,12 +718,12 @@
       *port = ntohs(name.sin_port);
       if (listen(sock, 1) < 0) {
         killsock(sock);
-	return -1;
+        return -1;
       }
     }
 #ifdef USE_IPV6
   }
-#endif
+#endif /* USE_IPV6 */
   return sock;
 }
 
@@ -736,7 +736,7 @@
   return open_address_listen(myip[0] ? getmyip() : INADDR_ANY, AF_INET, port);
 #else
   return open_address_listen(myip[0] ? getmyip() : INADDR_ANY, port);
-#endif
+#endif /* USE_IPV6 */
 }
 
 /* Same as above, except this one can be called with an AF_ type
@@ -749,7 +749,7 @@
   return open_address_listen(myip[0] ? getmyip() : INADDR_ANY, af_def, port);
 #else
   return 0;
-#endif
+#endif /* USE_IPV6 */
 }
 
 /* Given a network-style IP address, returns the hostname. The hostname
@@ -810,12 +810,12 @@
     addrlen = sizeof(from6);
     new_sock = accept(sock, (struct sockaddr *) &from6, &addrlen);
   } else {
-#endif
+#endif /* USE_IPV6 */
     addrlen = sizeof(struct sockaddr);
     new_sock = accept(sock, (struct sockaddr *) &from, &addrlen);
 #ifdef USE_IPV6
   }
-#endif
+#endif /* USE_IPV6 */
 
   if (new_sock < 0)
     return -1;
@@ -826,7 +826,7 @@
       egg_inet_ntop(AF_INET6, &from6, caller, 119);
       caller[120] = 0;
     } else {
-#endif
+#endif /* USE_IPV6 */
       *ip = from.sin_addr.s_addr;
       /* This is now done asynchronously. We now only provide the IP address.
        *
@@ -836,14 +836,14 @@
       *ip = ntohl(*ip);
 #ifdef USE_IPV6
     }
-#endif
+#endif /* USE_IPV6 */
   }
   if (port != NULL) {
 #ifdef USE_IPV6
       if (af_ty == AF_INET6)
         *port = ntohs(from6.sin6_port);
       else
-#endif
+#endif /* USE_IPV6 */
         *port = ntohs(from.sin_port);
     }
   /* Set up all the normal socket crap */
@@ -851,7 +851,7 @@
   setsock(new_sock, (binary ? SOCK_BINARY : 0), af_ty);
 #else
   setsock(new_sock, (binary ? SOCK_BINARY : 0));
-#endif
+#endif /* USE_IPV6 */
   return new_sock;
 }
 
@@ -861,7 +861,7 @@
 {
 #ifdef DEBUG_IPV6
   debug1("open_telnet_dcc %s", server);
-#endif
+#endif /* DEBUG_IPV6 */
   int p;
   unsigned long addr;
   char sv[500];
@@ -874,11 +874,11 @@
   if (getprotocol(server) == AF_INET6) {
 #ifdef DEBUG_IPV6
     debug0("open_telnet_dcc, af_inet6!");
-#endif
+#endif /* DEBUG_IPV6 */
     strncpyz(sv, server, sizeof sv);
     debug2("%s should be %s",sv,server);
   } else {
-#endif
+#endif /* USE_IPV6 */
     if (server != NULL)
       addr = my_atoul(server);
     else
@@ -893,10 +893,10 @@
 #ifdef USE_IPV6
     }
   /* strcpy(sv,hostnamefromip(addr)); */
-#ifdef DEBUG_IPV6
+#  ifdef DEBUG_IPV6
   debug3("open_telnet_raw %s %d %d", sv, sock,p);
-#endif
-#endif
+#  endif /* DEBUG_IPV6 */
+#endif /* USE_IPV6 */
   p = open_telnet_raw(sock, sv, p);
   return p;
 }
@@ -1462,7 +1462,7 @@
 #ifdef USE_IPV6
   if (getprotocol(ipaddy) == AF_INET6)
     return 1;
-#endif
+#endif /* USE_IPV6 */
 
   if (prt < 1) {
     putlog(LOG_MISC, "*", "ALERT: (%s!%s) specified an impossible port of %u!",
Index: eggdrop1.6/src/patch.h
diff -u eggdrop1.6/src/patch.h:1.981 eggdrop1.6/src/patch.h:1.982
--- eggdrop1.6/src/patch.h:1.981	Wed Apr 16 16:53:33 2003
+++ eggdrop1.6/src/patch.h	Wed Apr 16 20:55:57 2003
@@ -10,7 +10,7 @@
  * statement, leave the rest of the file alone, this allows better
  * overlapping patches.
  *
- * $Id: patch.h,v 1.981 2003/04/16 21:53:33 wcc Exp $
+ * $Id: patch.h,v 1.982 2003/04/17 01:55:57 wcc Exp $
  */
 /*
  * Copyright (C) 1997 Robey Pointer
@@ -41,12 +41,12 @@
  *
  *
  */
-patch("1050530001");            /* current unixtime */
+patch("1050544530");            /* current unixtime */
 /*
  *
  *
  */
-patch("addpatch");
+patch("ipv6-3");
 /*
  *
  *
Index: eggdrop1.6/src/proto.h
diff -u eggdrop1.6/src/proto.h:1.56 eggdrop1.6/src/proto.h:1.57
--- eggdrop1.6/src/proto.h:1.56	Mon Mar 31 23:33:40 2003
+++ eggdrop1.6/src/proto.h	Wed Apr 16 20:55:57 2003
@@ -7,7 +7,7 @@
  * because they use structures in those
  * (saves including those .h files EVERY time) - Beldin
  *
- * $Id: proto.h,v 1.56 2003/04/01 05:33:40 wcc Exp $
+ * $Id: proto.h,v 1.57 2003/04/17 01:55:57 wcc Exp $
  */
 /*
  * Copyright (C) 1997 Robey Pointer
@@ -254,7 +254,7 @@
 void setsock(int, int);
 int allocsock(int, int);
 int getsock(int);
-#endif
+#endif /* USE_IPV6 */
 int getprotocol(char *);
 char *hostnamefromip(unsigned long);
 void killsock(int);
@@ -265,7 +265,7 @@
 int open_address_listen(IP addr, int af_def, int *);
 #else
 int open_address_listen(IP addr, int *);
-#endif
+#endif /* USE_IPV6 */
 int open_telnet(char *, int);
 int open_telnet_dcc(int, char *, char *);
 int open_telnet_raw(int, char *, int);
Index: eggdrop1.6/src/tcl.c
diff -u eggdrop1.6/src/tcl.c:1.71 eggdrop1.6/src/tcl.c:1.72
--- eggdrop1.6/src/tcl.c:1.71	Mon Mar 31 23:33:40 2003
+++ eggdrop1.6/src/tcl.c	Wed Apr 16 20:55:57 2003
@@ -4,7 +4,7 @@
  *   Tcl initialization
  *   getting and setting Tcl/eggdrop variables
  *
- * $Id: tcl.c,v 1.71 2003/04/01 05:33:40 wcc Exp $
+ * $Id: tcl.c,v 1.72 2003/04/17 01:55:57 wcc Exp $
  */
 /*
  * Copyright (C) 1997 Robey Pointer
@@ -53,7 +53,8 @@
             pid_file[], hostname6[];
 #else
             pid_file[];
-#endif
+#endif /* USE_IPV6 */
+
 extern int backgrd, flood_telnet_thr, flood_telnet_time, shtime, share_greet,
            require_p, keep_all_logs, allow_new_telnets, stealth_telnets,
            use_telnet_banner, default_flags, conmask, switch_logfiles_at,
@@ -297,7 +298,7 @@
     }
 #else
     s = (char *) Tcl_GetVar2(interp, name1, name2, 0);
-#endif				/* USE_TCL_BYTE_ARRAYS */
+#endif /* USE_TCL_BYTE_ARRAYS */
     if (s != NULL) {
       if (strlen(s) > abs(st->max))
         s[abs(st->max)] = 0;
@@ -319,7 +320,7 @@
       }
 #ifdef USE_TCL_BYTE_ARRAYS
       free(s);
-#endif				/* USE_TCL_BYTE_ARRAYS */
+#endif /* USE_TCL_BYTE_ARRAYS */
     }
     return NULL;
   }
@@ -400,7 +401,7 @@
   }
 }
 
-#else				/* USE_TCL_BYTE_ARRAYS */
+#else /* USE_TCL_BYTE_ARRAYS */
 
 void add_tcl_commands(tcl_cmds *table)
 {
@@ -419,7 +420,7 @@
   }
 }
 
-#endif				/* USE_TCL_BYTE_ARRAYS */
+#endif /* USE_TCL_BYTE_ARRAYS */
 
 void rem_tcl_commands(tcl_cmds *table)
 {
@@ -445,7 +446,7 @@
   for (i = 0; table[i].name; i++)
     Tcl_CreateObjCommand(interp, table[i].name, table[i].func, (ClientData) 0,
                          NULL);
-#endif				/* USE_TCL_OBJ */
+#endif /* USE_TCL_OBJ */
 }
 
 static tcl_strings def_tcl_strings[] = {
@@ -466,7 +467,7 @@
 #ifdef USE_IPV6
   {"my-ip6",          myip6,          120,                     0},
   {"my-hostname6",    hostname6,      120,                     0},
-#endif
+#endif /* USE_IPV6 */
   {"network",         network,        40,                      0},
   {"whois-fields",    whois_fields,   1024,                    0},
   {"nat-ip",          natip,          120,                     0},
@@ -568,11 +569,11 @@
   const char *encoding;
   int i;
   char *langEnv;
-#endif				/* USE_TCL_ENCODING */
+#endif /* USE_TCL_ENCODING */
 #ifdef USE_TCL_PACKAGE
   int j;
   char pver[1024] = "";
-#endif				/* USE_TCL_PACKAGE */
+#endif /* USE_TCL_PACKAGE */
 
 /* This must be done *BEFORE* Tcl_SetSystemEncoding(),
  * or Tcl_SetSystemEncoding() will cause a segfault.
@@ -583,7 +584,7 @@
    * the environment variable PATH for it to register anything.
    */
   Tcl_FindExecutable(argv[0]);
-#endif				/* USE_TCL_FINDEXEC */
+#endif /* USE_TCL_FINDEXEC */
 
   /* Initialize the interpreter */
   interp = Tcl_CreateInterp();
@@ -671,7 +672,7 @@
   /* Keep the iso8859-1 encoding preloaded.  The IO package uses it for
    * gets on a binary channel. */
   Tcl_GetEncoding(NULL, "iso8859-1");
-#endif				/* USE_TCL_ENCODING */
+#endif /* USE_TCL_ENCODING */
 
 #ifdef USE_TCL_PACKAGE
   /* Add eggdrop to Tcl's package list */
@@ -681,7 +682,7 @@
     pver[strlen(pver)] = egg_version[j];
   }
   Tcl_PkgProvide(interp, "eggdrop", pver);
-#endif				/* USE_TCL_PACKAGE */
+#endif /* USE_TCL_PACKAGE */
 
   /* Initialize binds and traces */
   init_bind();
Index: eggdrop1.6/src/tcldcc.c
diff -u eggdrop1.6/src/tcldcc.c:1.46 eggdrop1.6/src/tcldcc.c:1.47
--- eggdrop1.6/src/tcldcc.c:1.46	Mon Mar 31 23:33:40 2003
+++ eggdrop1.6/src/tcldcc.c	Wed Apr 16 20:55:57 2003
@@ -2,7 +2,7 @@
  * tcldcc.c -- handles:
  *   Tcl stubs for the dcc commands
  *
- * $Id: tcldcc.c,v 1.46 2003/04/01 05:33:40 wcc Exp $
+ * $Id: tcldcc.c,v 1.47 2003/04/17 01:55:57 wcc Exp $
  */
 /*
  * Copyright (C) 1997 Robey Pointer
@@ -846,7 +846,7 @@
   sock = getsock(0, getprotocol(argv[1]));
 #else
   sock = getsock(0);
-#endif
+#endif /* USE_IPV6 */
 
   if (sock < 0) {
     Tcl_AppendResult(irp, MISC_NOFREESOCK, NULL);
@@ -923,13 +923,13 @@
     i = -1;
     while (port < j && i < 0) {
 #ifdef USE_IPV6
-	/* dum de dum, listen needs an af_def option, on linux this 
-         * will listen on both ipv6 and ipv4 
-         */
+      /* dum de dum, listen needs an af_def option, on linux this will listen on
+       * both ipv6 and ipv4 
+       */
       i = open_listen_by_af(&port, AF_INET6);
 #else
       i = open_listen(&port);
-#endif
+#endif /* USE_IPV6 */
       if (i == -1)
         port++;
       else if (i == -2)
@@ -948,7 +948,7 @@
     dcc[idx].addr = 0x00000000; /* it's not big enough to hold '0xffffffffffffffffffffffffffffffff' =P */
 #else
     dcc[idx].addr = iptolong(getmyip());
-#endif
+#endif /* USE_IPV6 */
     dcc[idx].port = port;
     dcc[idx].sock = i;
     dcc[idx].timeval = now;
Index: eggdrop1.6/src/tclmisc.c
diff -u eggdrop1.6/src/tclmisc.c:1.42 eggdrop1.6/src/tclmisc.c:1.43
--- eggdrop1.6/src/tclmisc.c:1.42	Mon Mar 31 23:33:40 2003
+++ eggdrop1.6/src/tclmisc.c	Wed Apr 16 20:55:57 2003
@@ -2,7 +2,7 @@
  * tclmisc.c -- handles:
  *   Tcl stubs for everything else
  *
- * $Id: tclmisc.c,v 1.42 2003/04/01 05:33:40 wcc Exp $
+ * $Id: tclmisc.c,v 1.43 2003/04/17 01:55:57 wcc Exp $
  */
 /*
  * Copyright (C) 1997 Robey Pointer
@@ -52,6 +52,7 @@
 extern int max_logs;
 extern log_t *logs;
 extern Tcl_Interp *interp;
+
 #ifdef USE_IPV6
 extern char myipv6host[120];
 
@@ -69,7 +70,7 @@
   Tcl_AppendResult(irp, s, NULL);
   return TCL_OK;
 }
-#endif
+#endif /* USE_IPV6 */
 
 int expmem_tclmisc()
 {
@@ -657,17 +658,17 @@
     Tcl_WrongNumArgs(irp, 1, objv, "string");
     return TCL_ERROR;
   }
-# ifdef USE_TCL_BYTE_ARRAYS
+#  ifdef USE_TCL_BYTE_ARRAYS
   string = Tcl_GetByteArrayFromObj(objv[1], &len);
-# else
+#  else
   string = Tcl_GetStringFromObj(objv[1], &len);
-# endif				/* USE_TCL_BYTE_ARRAYS */
-#else				/* USE_TCL_OBJ */
+#  endif /* USE_TCL_BYTE_ARRAYS */
+#else /* USE_TCL_OBJ */
   BADARGS(2, 2, " string");
   
   string = argv[1];
   len = strlen(argv[1]);
-#endif				/* USE_TCL_OBJ */
+#endif /* USE_TCL_OBJ */
 
   MD5_Init(&md5context);
   MD5_Update(&md5context, (unsigned char *) string, len);
@@ -681,7 +682,7 @@
 tcl_cmds tclmisc_objcmds[] = {
 #ifdef USE_TCL_OBJ
   {"md5", tcl_md5},
-#endif				/* USE_TCL_OBJ */
+#endif /* USE_TCL_OBJ */
   {NULL,     NULL}
 };
 
@@ -703,7 +704,7 @@
   {"myip",                 tcl_myip},
 #ifdef USE_IPV6
   {"myip6",               tcl_myip6},
-#endif
+#endif /* USE_IPV6 */
   {"rand",                 tcl_rand},
   {"sendnote",         tcl_sendnote},
   {"dumpfile",         tcl_dumpfile},
@@ -722,7 +723,7 @@
   {"duration",         tcl_duration},
 #ifndef USE_TCL_OBJ
   {"md5",                   tcl_md5},
-#endif				/* USE_TCL_OBJ */
+#endif /* USE_TCL_OBJ */
   {"binds",               tcl_binds},
   {"callevent",       tcl_callevent},
   {NULL,                       NULL}
----------------------- End of diff -----------------------


More information about the Changes mailing list