1 diff -urN eggdrop1.6.19/config.h.in eggdrop1.6.19-ipv6/config.h.in
2 --- config.h.in 2006-11-20 12:38:25.000000000 +0100
3 +++ config.h.in 2008-07-27 22:13:41.000000000 +0200
5 /* Define to `unsigned' if <sys/types.h> does not define. */
8 +/* Define if there is IPV6 */
11 /* Define to empty if the keyword `volatile' does not work. Warning: valid
12 code using `volatile' can become incorrect without. Disable with care. */
14 diff -urN eggdrop1.6.19/eggdrop.conf eggdrop1.6.19-ipv6/eggdrop.conf
15 --- eggdrop.conf 2008-02-16 21:15:30.000000000 +0100
16 +++ eggdrop.conf 2008-07-27 22:13:43.000000000 +0200
18 # by hostname or by IP. You may also want to set the hostname here if
19 # Eggdrop has trouble detecting it when it starts up.
20 #set my-hostname "virtual.host.com"
21 -#set my-ip "99.99.0.0"
22 +#set my-ip "98.76.54.32"
23 +#set my-hostname6 "virtual.host6.com"
24 +#set my-ip6 "2002:624c:3620::1"
26 # If you want to have your Eggdrop messages displayed in a language other
27 # than English, change this setting to match your preference. An alternative
28 diff -urN eggdrop1.6.19/src/botnet.c eggdrop1.6.19-ipv6/src/botnet.c
29 --- src/botnet.c 2008-02-16 22:41:03.000000000 +0100
30 +++ src/botnet.c 2008-07-27 22:13:40.000000000 +0200
32 strcpy(dcc[i].u.bot->version, "(primitive bot)");
33 dcc[i].u.bot->numver = idx;
34 dcc[i].u.bot->port = dcc[i].port; /* Remember where i started */
35 - dcc[i].sock = getsock(SOCK_STRONGCONN);
36 + dcc[i].sock = getsock(SOCK_STRONGCONN,getprotocol(dcc[i].host));
38 if (dcc[i].sock < 0 ||
39 open_telnet_raw(dcc[i].sock, iptostr(htonl(dcc[i].addr)),
43 killsock(dcc[idx].sock);
44 - dcc[idx].sock = getsock(SOCK_STRONGCONN);
45 + dcc[idx].sock = getsock(SOCK_STRONGCONN,getprotocol(dcc[idx].host));
46 dcc[uidx].u.relay->sock = dcc[idx].sock;
48 dcc[idx].timeval = now;
53 - dcc[i].sock = getsock(SOCK_STRONGCONN | SOCK_VIRTUAL);
54 + dcc[i].sock = getsock(SOCK_STRONGCONN | SOCK_VIRTUAL,getprotocol(bi->address));
55 if (dcc[i].sock < 0) {
57 dprintf(idx, "%s\n", MISC_NOFREESOCK);
58 diff -urN eggdrop1.6.19/src/chanprog.c eggdrop1.6.19-ipv6/src/chanprog.c
59 --- src/chanprog.c 2008-02-16 22:41:03.000000000 +0100
60 +++ src/chanprog.c 2008-07-27 22:13:41.000000000 +0200
62 botnetnick, ver, i, i == 1 ? "" : "s",
63 (int) (expected_memory() / 1024));
65 + dprintf(idx, "Unofficial IPv6 patch for v1.6.19 based on the v1.6.18 IPv6 patch \n");
70 diff -urN eggdrop1.6.19/src/dcc.c eggdrop1.6.19-ipv6/src/dcc.c
71 --- src/dcc.c 2008-02-16 22:41:03.000000000 +0100
72 +++ src/dcc.c 2008-07-27 22:13:42.000000000 +0200
76 killsock(dcc[idx].sock);
77 - dcc[idx].sock = getsock(SOCK_STRONGCONN);
78 + dcc[idx].sock = getsock(SOCK_STRONGCONN,getprotocol(dcc[idx].host));
80 dcc[idx].timeval = now;
81 if (dcc[idx].sock < 0 ||
83 changeover_dcc(i, &DCC_IDENTWAIT, 0);
85 dcc[i].u.ident_sock = dcc[idx].sock;
86 - sock = open_telnet(iptostr(htonl(dcc[i].addr)), 113);
87 + // sock = open_telnet(iptostr(htonl(dcc[i].addr)), 113);
88 + sock = open_telnet(dcc[i].host, 113);
89 putlog(LOG_MISC, "*", DCC_TELCONN, dcc[i].host, dcc[i].port);
92 diff -urN eggdrop1.6.19/src/main.c eggdrop1.6.19-ipv6/src/main.c
93 --- src/main.c 2008-02-16 22:41:03.000000000 +0100
94 +++ src/main.c 2008-07-28 18:35:52.000000000 +0200
96 * modified versions of this bot.
99 -char egg_version[1024] = "1.6.19";
100 -int egg_numver = 1061800;
101 +char egg_version[1024] = "1.6.19";
102 +int egg_numver = 1061900;
104 char notify_new[121] = ""; /* Person to send a note to for new users */
105 int default_flags = 0; /* Default user flags */
109 x = creat("DEBUG.DEBUG", 0644);
110 - setsock(x, SOCK_NONSOCK);
111 + setsock(x, SOCK_NONSOCK,AF_INET);
113 strncpyz(s, ctime(&now), sizeof s);
114 dprintf(-x, "Debug (%s) written %s\n", ver, s);
116 putlog(LOG_MISC, "*", "* Please REPORT this BUG!");
117 putlog(LOG_MISC, "*", "* Check doc/BUG-REPORT on how to do so.");
118 x = creat("DEBUG", 0644);
119 - setsock(x, SOCK_NONSOCK);
120 + setsock(x, SOCK_NONSOCK,AF_INET);
122 putlog(LOG_MISC, "*", "* Failed to write DEBUG");
125 userlist = adduser(userlist, dcc[n].nick, "none", "-", USER_PARTY);
126 dcc[n].user = get_user_by_handle(userlist, dcc[n].nick);
128 - setsock(STDOUT, 0); /* Entry in net table */
129 + setsock(STDOUT, 0,AF_INET); /* Entry in net table */
130 dprintf(n, "\n### ENTERING DCC CHAT SIMULATION ###\n\n");
133 diff -urN eggdrop1.6.19/src/mod/filesys.mod/filesys.c eggdrop1.6.19-ipv6/src/mod/filesys.mod/filesys.c
134 --- src/mod/filesys.mod/filesys.c 2008-02-16 22:41:09.000000000 +0100
135 +++ src/mod/filesys.mod/filesys.c 2008-07-27 22:13:44.000000000 +0200
139 dcc[i].timeval = now;
140 - dcc[i].sock = getsock(SOCK_BINARY);
141 + dcc[i].sock = getsock(SOCK_BINARY,getprotocol(ip));
142 if (dcc[i].sock < 0 || open_telnet_dcc(dcc[i].sock, ip, prt) < 0)
148 prt = newsplit(&msg);
150 + sock = getsock(0,getprotocol(ip));
151 if (sock < 0 || open_telnet_dcc(sock, ip, prt) < 0) {
154 diff -urN eggdrop1.6.19/src/mod/module.h eggdrop1.6.19-ipv6/src/mod/module.h
155 --- src/mod/module.h 2008-02-16 22:41:06.000000000 +0100
156 +++ src/mod/module.h 2008-07-27 22:13:45.000000000 +0200
159 #define new_dcc ((int (*) (struct dcc_table *, int))global[80])
160 #define lostdcc ((void (*) (int))global[81])
161 -#define getsock ((int (*) (int))global[82])
162 +/* #define getsock ((int (*) (int))global[82]) */
163 +#define getsock ((int (*) (int,int))global[82])
164 #define killsock ((void (*) (int))global[83])
166 #define open_listen ((int (*) (int *))global[84])
168 #define quiet_reject (*(int *)(global[284]))
169 #define file_readable ((int (*) (char *))global[285])
170 /* IPv6 leftovers: 286 */
171 +#define getprotocol ((int (*)(char *))global[286]) /* get protocol */
172 /* IPv6 leftovers: 287 */
174 /* IPv6 leftovers: 288 */
175 diff -urN eggdrop1.6.19/src/mod/server.mod/server.c eggdrop1.6.19-ipv6/src/mod/server.mod/server.c
176 --- src/mod/server.mod/server.c 2008-02-16 22:41:10.000000000 +0100
177 +++ src/mod/server.mod/server.c 2008-07-27 22:13:47.000000000 +0200
178 @@ -1517,7 +1517,7 @@
181 egg_snprintf(ip, sizeof ip, "%lu", iptolong(htonl(dcc[i].addr)));
182 - dcc[i].sock = getsock(0);
183 + dcc[i].sock = getsock(0,getprotocol(ip));
184 if (dcc[i].sock < 0 || open_telnet_dcc(dcc[i].sock, ip, buf) < 0) {
187 diff -urN eggdrop1.6.19/src/mod/server.mod/servmsg.c eggdrop1.6.19-ipv6/src/mod/server.mod/servmsg.c
188 --- src/mod/server.mod/servmsg.c 2008-02-16 22:41:10.000000000 +0100
189 +++ src/mod/server.mod/servmsg.c 2008-07-27 22:13:47.000000000 +0200
190 @@ -1261,7 +1261,9 @@
191 /* I'm resolving... don't start another server connect request */
193 /* Resolve the hostname. */
194 - dcc_dnsipbyhost(dcc[servidx].host);
195 + // dcc_dnsipbyhost(dcc[servidx].host);
196 + server_resolve_success(servidx);
201 @@ -1283,7 +1285,9 @@
202 dcc[servidx].addr = dcc[servidx].u.dns->ip;
203 strcpy(pass, dcc[servidx].u.dns->cbuf);
204 changeover_dcc(servidx, &SERVER_SOCKET, 0);
205 - serv = open_telnet(iptostr(htonl(dcc[servidx].addr)), dcc[servidx].port);
206 + //serv = open_telnet(iptostr(htonl(dcc[servidx].addr)), dcc[servidx].port);
207 + serv = open_telnet(dcc[servidx].host, dcc[servidx].port);
211 putlog(LOG_SERV, "*", "%s %s (%s)", IRC_FAILEDCONNECT, dcc[servidx].host,
212 diff -urN eggdrop1.6.19/src/mod/share.mod/share.c eggdrop1.6.19-ipv6/src/mod/share.mod/share.c
213 --- src/mod/share.mod/share.c 2008-02-16 22:41:11.000000000 +0100
214 +++ src/mod/share.mod/share.c 2008-07-27 22:13:48.000000000 +0200
215 @@ -1137,7 +1137,7 @@
218 port = newsplit(&par);
219 - sock = getsock(SOCK_BINARY); /* Don't buffer this -> mark binary. */
220 + sock = getsock(SOCK_BINARY,getprotocol(ip)); /* Don't buffer this -> mark binary. */
221 if (sock < 0 || open_telnet_dcc(sock, ip, port) < 0) {
223 putlog(LOG_BOTS, "*", "Asynchronous connection failed!");
224 diff -urN eggdrop1.6.19/src/modules.c eggdrop1.6.19-ipv6/src/modules.c
225 --- src/modules.c 2008-02-16 22:41:04.000000000 +0100
226 +++ src/modules.c 2008-07-27 22:13:45.000000000 +0200
228 extern tand_t *tandbot;
229 extern Tcl_Interp *interp;
230 extern sock_list *socklist;
231 +extern int getprotocol(char *);
237 (Function) & quiet_reject, /* int */
238 (Function) file_readable,
239 - (Function) 0, /* IPv6 leftovers: 286 */
240 + (Function) getprotocol, /* IPv6 leftovers: 286 */
241 (Function) 0, /* IPv6 leftovers: 287 */
243 (Function) 0, /* IPv6 leftovers: 288 */
244 diff -urN eggdrop1.6.19/src/net.c eggdrop1.6.19-ipv6/src/net.c
245 --- src/net.c 2008-02-16 22:41:04.000000000 +0100
246 +++ src/net.c 2008-07-27 22:13:46.000000000 +0200
249 char hostname[121] = ""; /* Hostname can be specified in the config file.*/
250 char myip[121] = ""; /* IP can be specified in the config file. */
251 +char myip6[121] = ""; /* IPV6 can be specified in the config file. */
252 +char hostname6[121] = ""; /* Hostname6 can be specified in the config file*/
254 char firewall[121] = ""; /* Socks server for firewall. */
255 int firewallport = 1080; /* Default port of socks 4/5 firewalls. */
256 char botuser[21] = "eggdrop"; /* Username of the user running the bot. */
261 +/* define the protocol based on a given host */
262 +int getprotocol(char *host)
267 + struct hostent *he;
268 + if (!setjmp(alarmret)) {
269 + alarm(resolve_timeout);
270 + he = gethostbyname2(host,AF_INET6);
277 + return AF_INET; // we check no resolve on IPv4 and assume it, if IPv6 does not works
283 /* Initialize the socklist
290 +struct hostent *myipv6he;
291 +char myipv6host[120];
305 + myipv6he = gethostbyname2(myip6,AF_INET6);
306 + if (myipv6he==NULL)
307 + fatal("Hostname IPV6 self-lookup failed.",0);
309 + if (hostname6[0]) {
310 + myipv6he = gethostbyname2(hostname6,AF_INET6);
311 + if (myipv6he==NULL)
312 + fatal("Hostname IPV6 self-lookup failed.",0);
316 + inet_ntop(AF_INET6,&myipv6he,myipv6host,119);
320 if ((myip[strlen(myip) - 1] >= '0') && (myip[strlen(myip) - 1] <= '9'))
321 return (IP) inet_addr(myip);
324 hp = gethostbyname(s);
327 + if (hp == NULL && myipv6he==NULL)
328 fatal("Hostname self-lookup failed. Please set 'my-ip' in the config "
330 + if (hp == NULL) return 0;
331 in = (struct in_addr *) (hp->h_addr_list[0]);
332 ip = (IP) (in->s_addr);
336 /* Return a free entry in the socket entry
338 -int allocsock(int sock, int options)
339 +int allocsock(int sock, int options, int af_ty)
344 socklist[i].inbuflen = socklist[i].outbuflen = 0;
345 socklist[i].flags = options;
346 socklist[i].sock = sock;
347 + socklist[i].af = af_ty;
353 /* Request a normal socket for i/o
355 -void setsock(int sock, int options)
356 +void setsock(int sock, int options, int af_ty)
358 - int i = allocsock(sock, options), parm;
359 + int i = allocsock(sock, options, af_ty), parm;
361 if (((sock != STDOUT) || backgrd) && !(socklist[i].flags & SOCK_NONSOCK)) {
363 @@ -284,12 +333,12 @@
364 fcntl(sock, F_SETFL, O_NONBLOCK);
367 -int getsock(int options)
368 +int getsock(int options, int AF_DEF)
370 - int sock = socket(AF_INET, SOCK_STREAM, 0);
371 + int sock = socket(AF_DEF, SOCK_STREAM, 0);
374 - setsock(sock, options);
375 + setsock(sock, options, AF_DEF);
377 putlog(LOG_MISC, "*", "Warning: Can't create new socket!");
379 @@ -328,23 +377,39 @@
381 static int proxy_connect(int sock, char *host, int port, int proxy)
384 + unsigned char x[32];
393 + af_ty=getprotocol(host);
396 if (proxy == PROXY_SOCKS) {
398 - if (host[strlen(host) - 1] >= '0' && host[strlen(host) - 1] <= '9') {
399 + if ((host[strlen(host) - 1] >= '0' && host[strlen(host) - 1] <= '9') && af_ty!=AF_INET6) {
400 IP ip = ((IP) inet_addr(host));
401 egg_memcpy(x, &ip, 4);
403 /* no, must be host.domain */
404 if (!sigsetjmp(alarmret, 1)) {
406 alarm(resolve_timeout);
407 + if (af_ty==AF_INET6)
409 + hp = gethostbyname(host);
412 hp = gethostbyname(host);
421 for (i = 0; i < MAXSOCKS; i++)
422 if (!(socklist[i].flags & SOCK_UNUSED) && socklist[i].sock == sock)
423 socklist[i].flags |= SOCK_PROXYWAIT; /* drummer */
426 + if (af_ty==AF_INET6)
427 + egg_snprintf(s, sizeof s,"\004\001%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%s", (port >> 8) % 256, (port % 256),
428 + x[0], x[1], x[2], x[3],
429 + x[4], x[5], x[6], x[7],
430 + x[8], x[9], x[10], x[11],
431 + x[12], x[13], x[14], x[15],
435 egg_snprintf(s, sizeof s, "\004\001%c%c%c%c%c%c%s", (port >> 8) % 256,
436 (port % 256), x[0], x[1], x[2], x[3], botuser);
437 tputs(sock, s, strlen(botuser) + 9); /* drummer */
443 + * Return protocol of socket
445 +int getsockproto(int sock)
448 + for (i = 0 ; i < MAXSOCKS ; i++) {
449 + if (socklist[i].sock == sock)
450 + return socklist[i].af;
452 + return AF_INET; // default
455 /* Starts a connection attempt to a socket
457 * If given a normal hostname, this will be resolved to the corresponding
459 int open_telnet_raw(int sock, char *server, int sport)
461 struct sockaddr_in name;
463 + struct sockaddr_in6 name6;
464 + unsigned long succ;
474 /* firewall? use socks */
476 strcpy(host, server);
480 + af_ty = getprotocol(host);
481 + if(af_ty==AF_INET6)
484 + bzero((char *) &name6, sizeof(struct sockaddr_in6));
486 + name6.sin6_family = AF_INET6;
489 + if (myipv6he==NULL)
491 + memcpy(&name6.sin6_addr,&in6addr_any,16);
493 + memcpy(&name6.sin6_addr,myipv6he->h_addr,myipv6he->h_length);
498 + if (bind(sock, (struct sockaddr *) &name6, sizeof(name6)) < 0) {
502 + bzero((char *) &name6, sizeof(struct sockaddr_in6));
503 + name6.sin6_family = AF_INET6;
504 + name6.sin6_port = htons(port);
505 + if (!setjmp(alarmret)) {
506 + alarm(resolve_timeout);
507 + hp = gethostbyname2(host,AF_INET6);
512 + egg_memcpy((char *) &name6.sin6_addr, hp->h_addr, hp->h_length);
513 + name6.sin6_family = hp->h_addrtype;
516 egg_bzero((char *) &name, sizeof(struct sockaddr_in));
518 name.sin_family = AF_INET;
519 @@ -428,11 +560,20 @@
520 egg_memcpy(&name.sin_addr, hp->h_addr, hp->h_length);
521 name.sin_family = hp->h_addrtype;
526 for (i = 0; i < MAXSOCKS; i++) {
527 if (!(socklist[i].flags & SOCK_UNUSED) && (socklist[i].sock == sock))
528 socklist[i].flags = (socklist[i].flags & ~SOCK_VIRTUAL) | SOCK_CONNECT;
530 - rc = connect(sock, (struct sockaddr *) &name, sizeof(struct sockaddr_in));
531 + //rc = connect(sock, (struct sockaddr *) &name, sizeof(struct sockaddr_in));
533 + if (af_ty == AF_INET6)
534 + rc = connect(sock, (struct sockaddr *) &name6, sizeof(struct sockaddr_in6));
537 + rc = connect(sock, (struct sockaddr *) &name, sizeof(struct sockaddr_in)) ;
539 if (errno == EINPROGRESS) {
540 /* Firewall? announce connect attempt to proxy */
542 /* Ordinary non-binary connection attempt */
543 int open_telnet(char *server, int port)
545 - int sock = getsock(0), ret = open_telnet_raw(sock, server, port);
546 + int sock = getsock(0,getprotocol(server)), ret = open_telnet_raw(sock, server, port);
548 + putlog(LOG_DEBUG, "*", "net.c / open_telnet");
556 int open_address_listen(IP addr, int *port)
563 + struct sockaddr_in6 name6;
565 struct sockaddr_in name;
572 - sock = getsock(SOCK_LISTEN);
574 + sock = getsock(SOCK_LISTEN,af_def);
579 name.sin_addr.s_addr = addr;
580 if (bind(sock, (struct sockaddr *) &name, sizeof(name)) < 0) {
585 /* what port are we on? */
586 addrlen = sizeof(name);
588 *port = ntohs(name.sin_port);
589 if (listen(sock, 1) < 0) {
599 + if(af_def==AF_INET6 && myipv6he!=NULL)
601 + sock = getsock(SOCK_LISTEN,af_def);
602 + bzero((char *) &name6,sizeof(name6));
603 + name6.sin6_family=af_def;
604 + name6.sin6_port=htons(*port);
605 + memcpy(&name6.sin6_addr,myipv6he->h_addr,myipv6he->h_length);
606 + if (bind(sock, (struct sockaddr *) &name6, sizeof(name6)) < 0) {
610 + addrlen = sizeof(name6);
611 + if (getsockname(sock, (struct sockaddr *) &name6, &addrlen) < 0) {
615 + *port = ntohs(name6.sin6_port);
616 + if (listen(sock, 1) < 0) {
629 +unsigned long notalloc=0;
632 /* Short routine to answer a connect received on a socket made previously
633 * by open_listen ... returns hostname of the caller & the new socket
634 * does NOT dispose of old "public" socket!
635 @@ -529,23 +711,57 @@
641 + struct sockaddr_in6 from6;
643 struct sockaddr_in from;
644 + af_ty=getsockproto(sock);
646 addrlen = sizeof(struct sockaddr);
648 + if (af_ty==AF_INET6)
650 + addrlen = sizeof(from6);
651 + new_sock = accept(sock, (struct sockaddr *) &from6, &addrlen);
654 + addrlen = sizeof(struct sockaddr);
655 new_sock = accept(sock, (struct sockaddr *) &from, &addrlen);
664 + if (af_ty==AF_INET6)
667 + inet_ntop(AF_INET6,&from6,caller,119);
671 *ip = from.sin_addr.s_addr;
672 /* DNS is now done asynchronously. We now only provide the IP address. */
673 strncpyz(caller, iptostr(*ip), 121);
682 + if (af_ty==AF_INET6)
683 + *port = ntohs(from6.sin6_port);
686 *port = ntohs(from.sin_port);
688 /* Set up all the normal socket crap */
689 - setsock(new_sock, (binary ? SOCK_BINARY : 0));
690 + setsock(new_sock, (binary ? SOCK_BINARY : 0),af_ty);
699 + if(getprotocol(server)==AF_INET6)
702 + if(strlen(server)<500)
707 addr = my_atoul(server);
710 c[2] = (addr >> 8) & 0xff;
712 sprintf(sv, "%u.%u.%u.%u", c[0], c[1], c[2], c[3]);
716 p = open_telnet_raw(sock, sv, p);
719 @@ -1112,6 +1339,14 @@
720 if (!dcc_sanitycheck)
724 + if(getprotocol(ipaddy)==AF_INET6)
732 putlog(LOG_MISC, "*", "ALERT: (%s!%s) specified an impossible port of %u!",
734 diff -urN eggdrop1.6.19/src/proto.h eggdrop1.6.19-ipv6/src/proto.h
735 --- src/proto.h 2008-02-16 22:41:04.000000000 +0100
736 +++ src/proto.h 2008-07-27 22:13:46.000000000 +0200
738 unsigned long iptolong(IP);
740 void neterror(char *);
741 -void setsock(int, int);
742 -int allocsock(int, int);
744 +void setsock(int, int, int);
745 +int allocsock(int, int, int);
746 +int getsock(int, int);
747 +int getprotocol(char *);
748 +char *hostnamefromip(unsigned long);
750 int answer(int, char *, unsigned long *, unsigned short *, int);
751 inline int open_listen(int *);
752 diff -urN eggdrop1.6.19/src/tcl.c eggdrop1.6.19-ipv6/src/tcl.c
753 --- src/tcl.c 2008-02-16 22:41:04.000000000 +0100
754 +++ src/tcl.c 2008-07-27 22:13:49.000000000 +0200
756 extern time_t online_since;
758 extern char origbotname[], botuser[], motdfile[], admin[], userfile[],
759 - firewall[], helpdir[], notify_new[], hostname[], myip[], moddir[],
760 + firewall[], helpdir[], notify_new[], hostname[], hostname6[], myip[], myip6[], moddir[],
761 tempdir[], owner[], network[], botnetnick[], bannerfile[],
762 egg_version[], natip[], configfile[], logfile_suffix[], textdir[],
765 {"owner", owner, 120, STR_PROTECT},
766 {"my-ip", myip, 120, 0},
767 {"my-hostname", hostname, 120, 0},
768 + {"my-ip6", myip6, 120, 0},
769 + {"my-hostname6", hostname6, 120, 0},
770 {"network", network, 40, 0},
771 {"whois-fields", whois_fields, 1024, 0},
772 {"nat-ip", natip, 120, 0},
773 diff -urN eggdrop1.6.19/src/tcldcc.c eggdrop1.6.19-ipv6/src/tcldcc.c
774 --- src/tcldcc.c 2008-02-16 22:41:04.000000000 +0100
775 +++ src/tcldcc.c 2008-07-27 22:13:50.000000000 +0200
777 Tcl_AppendResult(irp, "out of dcc table space", NULL);
781 + sock = getsock(0,getprotocol(argv[1]));
784 Tcl_AppendResult(irp, MISC_NOFREESOCK, NULL);
785 diff -urN eggdrop1.6.19/src/tclmisc.c eggdrop1.6.19-ipv6/src/tclmisc.c
786 --- src/tclmisc.c 2008-02-16 22:41:04.000000000 +0100
787 +++ src/tclmisc.c 2008-07-27 22:13:50.000000000 +0200
792 +extern char myipv6host[120];
794 +static int tcl_myip6 STDVAR
801 + if (strlen(myipv6host)<120)
802 + strcpy(s,myipv6host);
803 + Tcl_AppendResult(irp, s, NULL);
807 static int tcl_rand STDVAR
809 unsigned long x;*** eggdrop1.6.19/src/net.h.org Thu Feb 5 23:55:45 2009
810 --- src/net.h.org 2009-02-05 23:59:43.000000000 +0100
811 +++ src/net.h 2009-02-05 23:59:52.000000000 +0100
814 unsigned long outbuflen; /* Outbuf could be binary data */
815 unsigned long inbuflen; /* Inbuf could be binary data */
818 -#endif /* USE_IPV6 */
821 #endif /* _EGG_NET_H */