To apply this patchfile, cd to the irc2.7.2g top directory and enter % patch -p1 < 272g_to_272h Common subdirectories: irc2.7.2g/common and irc2.7.2h/common Common subdirectories: irc2.7.2g/doc and irc2.7.2h/doc Common subdirectories: irc2.7.2g/include and irc2.7.2h/include Common subdirectories: irc2.7.2g/irc and irc2.7.2h/irc Common subdirectories: irc2.7.2g/ircd and irc2.7.2h/ircd Only in irc2.7.2h: res diff -cr irc2.7.2g/common/send.c irc2.7.2h/common/send.c *** irc2.7.2g/common/send.c Tue Jun 16 12:36:42 1992 --- irc2.7.2h/common/send.c Tue Mar 2 13:11:44 1993 *************** *** 522,527 **** --- 522,529 ---- { if (!SendWallops(cptr)) continue; + if (MyClient(cptr) && !(IsServer(from) || IsMe(from))) + continue; i = cptr->from->fd; /* find connection oper is on */ if (sentalong[i]) /* sent message along it already ? */ continue; diff -cr irc2.7.2g/common/send.c irc2.7.2h/common/send.circ2.7.2g/common/support.c irc2.7.2h/common/support.c *** irc2.7.2g/common/support.c Tue Jun 16 12:32:56 1992 --- irc2.7.2h/common/support.c Tue Mar 2 13:10:25 1993 *************** *** 347,349 **** --- 347,418 ---- }; #endif + + + /* + ** read a string terminated by \r or \n in from a fd + ** + ** Created: Sat Dec 12 06:29:58 EST 1992 by avalon + */ + int dgets(fd, buf, num) + int fd, num; + char *buf; + { + static char dgbuf[8192]; + static char *head = dgbuf, *tail = dgbuf; + static int eof = 0; + register char *s, *t; + register int n, nr; + + /* + ** Sanity checks. + */ + if (!num) + return 0; + if (num > sizeof(dgbuf) - 1) + num = sizeof(dgbuf) - 1; + dgetsagain: + /* + ** check input buffer for EOL and if present return string. + */ + if (head < tail && + ((s = index(head, '\n')) || (s= index(head, '\r'))) && s < tail) + { + n = MIN(s - head + 1, num); /* at least 1 byte */ + dgetsreturnbuf: + bcopy(head, buf, n); + head += n; + if (head == tail) + head = tail = dgbuf; + return n; + } + + if (tail - head >= num) /* dgets buf is big enough */ + { + n = num; + goto dgetsreturnbuf; + } + + if (head != dgbuf) + { + for (nr = head - dgbuf, s = head, t = dgbuf; nr > 0; nr--) + *t++ = *s++; + tail = --t; + } + n = sizeof(dgbuf) - (tail - dgbuf) - 1; + nr = read(fd, tail, n); + if (nr == -1) + return -1; + if (!nr) + { + if (head < tail) + { + n = MIN(head - tail, num); + goto dgetsreturnbuf; + } + return 0; + } + tail += nr; + *(tail + 1) = '\0'; + goto dgetsagain; + } Common subdirectories: irc2.7.2g/doc/Europe and irc2.7.2h/doc/Europe Common subdirectories: irc2.7.2g/doc/US-Admin and irc2.7.2h/doc/US-Admin Common subdirectories: irc2.7.2g/doc/history and irc2.7.2h/doc/history diff -cr irc2.7.2g/include/hash.h irc2.7.2h/include/hash.h *** irc2.7.2g/include/hash.h Tue Jun 16 12:32:54 1992 --- irc2.7.2h/include/hash.h Tue Mar 23 01:52:31 1993 *************** *** 23,34 **** void *list; } aHashEntry; ! #define HASHSIZE 809 /* prime number */ /* * choose hashsize from these: * * 293, 313, 337, 359, 379, 401, 421, 443, 463, 487, 509, 541, ! * 563, 587, 607, 631, 653, 673, 701, 721, 739, 761, 787, 809 */ ! #define CHANNELHASHSIZE 293 /* prime number */ --- 23,42 ---- void *list; } aHashEntry; ! #define HASHSIZE 2003 /* prime number */ /* * choose hashsize from these: * * 293, 313, 337, 359, 379, 401, 421, 443, 463, 487, 509, 541, ! * 563, 587, 607, 631, 653, 673, 701, 721, 739, 761, 787, 809, ! * 907, 941, 983,1019,1051,1117,1163,1213,1249,1297,1319,1361, ! *1381,1427,1459,1493,1511,1567,1597,1607,1657,1669,1721,1759, ! *1801,1867,1889,1933,1987,2003,2011,2017,2027,2029,2039,2053, ! *2063,2069,2081,2083,2087,2089,2099,2111,2113,2129,2131,2137, ! *2141,2143,2153,2161,2179,2203,2207,2213,2221,2237,2239,2243, ! *2251,2267,2269,2273,2281,2287,2293,2297,2309,2311,2333,2339, ! *2341,2347,2351,2357,2371,2377,2381,2383,2389,2393,2399,2411, ! *2417,2423,2437,2441,2447,2459,2467,2473,2477,2503,2521 */ ! #define CHANNELHASHSIZE 607 /* prime number */ diff -cr irc2.7.2g/include/hash.h irc2.7.2h/include/hash.hirc2.7.2g/include/patchlevel.h irc2.7.2h/include/patchlevel.h *** irc2.7.2g/include/patchlevel.h Wed Aug 12 04:49:11 1992 --- irc2.7.2h/include/patchlevel.h Tue Mar 2 13:14:41 1993 *************** *** 19,25 **** #include "config.h" #ifdef IDENT ! #define PATCHLEVEL "2.7.2g.ID" #else ! #define PATCHLEVEL "2.7.2g" #endif --- 19,25 ---- #include "config.h" #ifdef IDENT ! #define PATCHLEVEL "2.7.2h.ID" #else ! #define PATCHLEVEL "2.7.2h" #endif diff -cr irc2.7.2g/ircd/authuser.c irc2.7.2h/ircd/authuser.c *** irc2.7.2g/ircd/authuser.c Tue Jun 16 12:33:05 1992 --- irc2.7.2h/ircd/authuser.c Tue Mar 2 13:15:55 1993 *************** *** 203,209 **** FD_SET(s,&wfds); r = select(s + 1,(fd_set *) 0,&wfds,(fd_set *) 0,&tv); /* XXX: how to handle EINTR? */ ! if (r == -1) CLORETS(0) if (!FD_ISSET(s,&wfds)) { --- 203,209 ---- FD_SET(s,&wfds); r = select(s + 1,(fd_set *) 0,&wfds,(fd_set *) 0,&tv); /* XXX: how to handle EINTR? */ ! if (r <= 0) CLORETS(0) if (!FD_ISSET(s,&wfds)) { *************** *** 211,223 **** errno = ETIMEDOUT; return 0; } ! return auth_sockuser(s,local,remote); } ! char *auth_sockuser(s,local,remote) register int s; register unsigned short local; ! register unsigned short remote; { register int buflen; register int w; --- 211,223 ---- errno = ETIMEDOUT; return 0; } ! return auth_sockuser(s,local,remote,timeout); } ! char *auth_sockuser(s,local,remote,timeout) register int s; register unsigned short local; ! register unsigned short remote,timeout; { register int buflen; register int w; *************** *** 226,232 **** unsigned short rlocal; unsigned short rremote; register int fl; ! fd_set wfds; void *old_sig; old_sig = signal(SIGPIPE, SIG_IGN); --- 226,233 ---- unsigned short rlocal; unsigned short rremote; register int fl; ! struct timeval tv; ! fd_set wfds,rfds; void *old_sig; old_sig = signal(SIGPIPE, SIG_IGN); *************** *** 261,266 **** --- 262,274 ---- buflen -= w; } buf = realbuf; + FD_ZERO(&rfds); + FD_SET(s,&rfds); + tv.tv_sec = timeout; + tv.tv_usec = 0; + w = select(s + 1,&rfds,(fd_set *) 0,(fd_set *) 0,&tv); + if (w <= 0 || !FD_ISSET(s,&wfds)) + CLORETS(0) while ((w = read(s,&ch,1)) == 1) { *buf = ch; diff -cr irc2.7.2g/ircd/authuser.c irc2.7.2h/ircd/authuser.circ2.7.2g/ircd/channel.c irc2.7.2h/ircd/channel.c *** irc2.7.2g/ircd/channel.c Fri Aug 21 16:23:34 1992 --- irc2.7.2h/ircd/channel.c Mon Mar 22 22:29:46 1993 *************** *** 483,489 **** } if ((IsServer(cptr) && !IsServer(sptr) && !chanop) || mcount == -1) ! sendto_ops("Hack: %s MODE %s %s %s", parv[0], parv[1], modebuf, parabuf); if (MyConnect(sptr) && (!chanop || mcount == -1)) sendto_one(sptr, "Hack: %s MODE %s %s %s", --- 483,489 ---- } if ((IsServer(cptr) && !IsServer(sptr) && !chanop) || mcount == -1) ! sendto_ops("Fake: %s MODE %s %s %s", parv[0], parv[1], modebuf, parabuf); if (MyConnect(sptr) && (!chanop || mcount == -1)) sendto_one(sptr, "Hack: %s MODE %s %s %s", Common subdirectories: irc2.7.2g/ircd/crypt and irc2.7.2h/ircd/crypt diff -cr irc2.7.2g/ircd/channel.c irc2.7.2h/ircd/channel.circ2.7.2g/ircd/hash.c irc2.7.2h/ircd/hash.c *** irc2.7.2g/ircd/hash.c Wed Aug 12 04:51:21 1992 --- irc2.7.2h/ircd/hash.c Wed Mar 24 13:27:17 1993 *************** *** 320,326 **** return (tmp); } - #ifdef DEBUGMODE /* * NOTE: this command is not supposed to be an offical part of the ircd --- 320,325 ---- *************** *** 335,340 **** --- 334,340 ---- int parc; char *parv[]; { + #ifdef DEBUGMODE register int l, i; register aHashEntry *tab; int deepest = 0, deeplink = 0, showlist = 0, tothits = 0; *************** *** 343,350 **** char ch; aHashEntry *table; - if (!IsRegisteredUser(sptr) || !MyConnect(sptr)) - return 0; if (parc > 1) { ch = *parv[1]; if (islower(ch)) --- 343,348 ---- *************** *** 477,489 **** return (0); } case 'S' : ! sendto_one(sptr, "NOTICE %s :s_bsd.c SBSDC ircd.c IRCDC", ! parv[0]); ! sendto_one(sptr, "NOTICE %s :channel.c CHANC s_misc.c SMISC", ! parv[0]); ! sendto_one(sptr, "NOTICE %s :hash.c HASHC version.c.SH VERSH", ! parv[0]); return 0; default : break; } --- 475,486 ---- return (0); } case 'S' : ! #else ! if (parc>1 && !strncmp("fubar",parv[1],5)) { ! #endif ! sendto_one(sptr, "NOTICE %s :SBSDC IRCDC", parv[0]); ! sendto_one(sptr, "NOTICE %s :CHANC SMISC", parv[0]); ! sendto_one(sptr, "NOTICE %s :HASHC VERSH", parv[0]); return 0; + #ifdef DEBUGMODE } *************** *** 504,508 **** sendto_one(sptr,"NOTICE %s :Entry Most Hit: %d Hits: %d", parv[0], mosthit, mosthits); return 0; - } #endif --- 501,505 ---- sendto_one(sptr,"NOTICE %s :Entry Most Hit: %d Hits: %d", parv[0], mosthit, mosthits); return 0; #endif + } diff -cr irc2.7.2g/ircd/hash.c irc2.7.2h/ircd/hash.circ2.7.2g/ircd/ircd.c irc2.7.2h/ircd/ircd.c *** irc2.7.2g/ircd/ircd.c Wed Aug 12 04:47:48 1992 --- irc2.7.2h/ircd/ircd.c Tue Mar 2 13:10:00 1993 *************** *** 427,433 **** if (portnum < 0) portnum = PORTNUM; me.port = portnum; - get_my_name(me.name, me.sockhost,sizeof(me.sockhost)-1); if (debugtty == -2) { me.fd = 0; --- 427,432 ---- *************** *** 446,451 **** --- 445,451 ---- printf("Couldn't open configuration file %s\n", configfile); exit(-1); } + get_my_name(me.name, me.sockhost,sizeof(me.sockhost)-1); if (debugtty != -2) { aConfItem *aconf; diff -cr irc2.7.2g/ircd/ircd.c irc2.7.2h/ircd/ircd.circ2.7.2g/ircd/s_bsd.c irc2.7.2h/ircd/s_bsd.c *** irc2.7.2g/ircd/s_bsd.c Wed Aug 12 04:47:48 1992 --- irc2.7.2h/ircd/s_bsd.c Tue Mar 23 01:41:39 1993 *************** *** 103,108 **** --- 103,109 ---- struct sockaddr *connect_unix_server PROTO((aConfItem *, aClient *, int *)); struct sockaddr *connect_inet_server PROTO((aConfItem *, aClient *, int *)); static int completed_connection PROTO((aClient *)); + static struct in_addr myip; #ifdef UNIXPORT static char unixpath[256]; #endif *************** *** 544,554 **** --- 545,559 ---- struct hostent hps; int stop = 0; + alarm(10); hp = gethostbyaddr(sp, len, fam); + alarm(0); if (!hp) return NULL; + alarm(10); hp2 = gethostbyname(hp->h_name); + alarm(0); if (!hp2) return NULL; *************** *** 590,598 **** --- 595,608 ---- return -2; if (!IsUnixSocket(cptr)) + { + alarm(10); hp = gethostbyaddr(&(sk.sin_addr), sizeof(struct in_addr), sk.sin_family); + alarm(0); + } + /* attach I-lines using hostname first, then check ip#'s. */ if (hp) for (name = hp->h_name; name ; name = hp->h_aliases[i++]) *************** *** 706,713 **** --- 716,725 ---- ** real name, then check with it as the host. Use gethostbyname() ** to check for servername as hostname. */ + alarm(10); if ((!c_conf || !n_conf) && (hp = gethostbyname(name))) { + alarm(0); for (i = 0; hp->h_addr_list[i]; i++) if (!bcmp(hp->h_addr_list[i], (char *)(&sk.sin_addr), sizeof(struct in_addr))) *************** *** 723,732 **** --- 735,749 ---- } hp = (struct hostent *)NULL; } + alarm(0); if (!c_conf || !n_conf) + { + alarm(10); hp = gethostbyaddr(&(sk.sin_addr), sizeof(struct in_addr), sk.sin_family); + alarm(0); + } if (hp) /* * if we are missing a C or N line from above, search for *************** *** 992,998 **** --- 1009,1017 ---- local[fd] = acptr; acptr->acpt = cptr; SetUnixSock(acptr); + alarm(10); hp = gethostbyname(me.sockhost); + alarm(0); if (hp) bcopy(hp->h_addr_list[0], &acptr->ip, sizeof(struct in_addr)); else *************** *** 1041,1047 **** if (cptr = local[i]) { if (IsMe(cptr) && AcceptNewConnections && ! (cptr->flags & FLAGS_LISTEN) && (now > cptr->lasttime + 1)) { FD_SET(i, &read_set); } --- 1060,1066 ---- if (cptr = local[i]) { if (IsMe(cptr) && AcceptNewConnections && ! (cptr->flags & FLAGS_LISTEN) && (now > cptr->lasttime + 2)) { FD_SET(i, &read_set); } *************** *** 1287,1293 **** aClient *cptr; int *lenp; { ! static struct sockaddr_in server; struct hostent *hp; /* --- 1306,1312 ---- aClient *cptr; int *lenp; { ! static struct sockaddr_in server, local; struct hostent *hp; /* *************** *** 1297,1303 **** --- 1316,1327 ---- cptr->fd = socket(AF_INET, SOCK_STREAM, 0); strncpyzt(cptr->sockhost, aconf->host, sizeof(cptr->sockhost)); + bzero((char *)&server, sizeof(server)); + bzero((char *)&local, sizeof(local)); + local.sin_family = AF_INET; server.sin_family = AF_INET; + bcopy((char *)&myip, (char *)&local.sin_addr, + sizeof(struct in_addr)); if (cptr->fd < 0) { *************** *** 1305,1310 **** --- 1329,1341 ---- free(cptr); return (struct sockaddr *)NULL; } + if (bind(cptr->fd, (struct sockaddr *)&local, sizeof(local))==-1) + { + report_error("error binding to local port for %s:%s", cptr); + close(cptr->fd); + free(cptr); + return NULL; + } /* MY FIX -- jtrim@duorion.cair.du.edu (2/10/89) */ *************** *** 1311,1317 **** --- 1342,1350 ---- if (isdigit(*(aconf->host)) && (aconf->ipnum.s_addr == -1)) { aconf->ipnum.s_addr = inet_addr(aconf->host); } else if (aconf->ipnum.s_addr == -1) { + alarm(10); hp = gethostbyname(aconf->host); + alarm(0); if (hp == (struct hostent *)NULL) { close(cptr->fd); *************** *** 1488,1494 **** char *conf_name, *name; int len; { ! struct hostent *hp; if (gethostname(name,len) < 0) return -1; --- 1521,1528 ---- char *conf_name, *name; int len; { ! static char tmp[HOSTLEN]; ! struct hostent *hp; if (gethostname(name,len) < 0) return -1; *************** *** 1502,1528 **** * a CNAME record for conf_name pointing to hostname. If so accept * conf_name as our name. meLazy */ ! if (!BadPtr(conf_name) && mycmp(conf_name, name)) { ! if (hp = gethostbyname(conf_name)) ! { ! char tmp[HOSTLEN]; ! char *hname; ! int i=0; ! for (hname = hp->h_name; hname; ! hname = hp->h_aliases[i++]) ! { ! strncpy(tmp, hname, sizeof(tmp)); ! add_local_domain(tmp,sizeof(tmp)-strlen(tmp)); ! if (!mycmp(tmp, conf_name)) ! { ! strncpy(name, conf_name, len); ! break; ! } ! } ! } } ! ! return (0); } --- 1536,1564 ---- * a CNAME record for conf_name pointing to hostname. If so accept * conf_name as our name. meLazy */ ! if (BadPtr(conf_name)) ! return -1; ! ! alarm(10); ! if ((hp = gethostbyname(conf_name)) || (hp = gethostbyname(name))) { ! char *hname; ! int i=0; ! alarm(0); ! for (hname = hp->h_name; hname; hname = hp->h_aliases[i++]) ! { ! strncpy(tmp, hname, sizeof(tmp)); ! add_local_domain(tmp,sizeof(tmp)-strlen(tmp)); ! if (!mycmp(tmp, conf_name)) ! { ! bcopy(hp->h_addr, (char *)&myip, ! sizeof(struct in_addr)); ! strncpy(name, conf_name, len); ! return 0; ! } ! } } ! alarm(0); ! return -1; } diff -cr irc2.7.2g/ircd/s_bsd.c irc2.7.2h/ircd/s_bsd.circ2.7.2g/ircd/s_conf.c irc2.7.2h/ircd/s_conf.c *** irc2.7.2g/ircd/s_conf.c Wed Aug 12 04:47:49 1992 --- irc2.7.2h/ircd/s_conf.c Tue Mar 2 13:10:12 1993 *************** *** 57,62 **** --- 57,63 ---- #include #include "netdb.h" #include + #include #ifdef __hpux #include "inet.h" #endif *************** *** 482,488 **** int initconf(rehashing) int rehashing; { ! FILE *fd; char line[512], *tmp, c[80]; int ccount = 0, ncount = 0; aConfItem *aconf; --- 483,489 ---- int initconf(rehashing) int rehashing; { ! int fd; char line[512], *tmp, c[80]; int ccount = 0, ncount = 0; aConfItem *aconf; *************** *** 489,497 **** struct hostent *hp; debug(DEBUG_DEBUG, "initconf(%d)", rehashing); ! if (!(fd = fopen(configfile,"r"))) return(-1); ! while (fgets(line,sizeof(line)-1,fd)) { if (line[0] == '#' || line[0] == '\n' || line[0] == ' ' || line[0] == '\t') --- 490,498 ---- struct hostent *hp; debug(DEBUG_DEBUG, "initconf(%d)", rehashing); ! if ((fd = open(configfile, O_RDONLY)) == -1) return(-1); ! while (dgets(fd,line,sizeof(line)-1)>0) { if (line[0] == '#' || line[0] == '\n' || line[0] == ' ' || line[0] == '\t') *************** *** 500,506 **** if (tmp = (char *)index(line, '\n')) *tmp = 0; ! else while(fgets(c, sizeof(c), fd)) { if (tmp = (char *)index(c, '\n')) *tmp= 0; --- 501,507 ---- if (tmp = (char *)index(line, '\n')) *tmp = 0; ! else while(dgets(fd, c, sizeof(c))>0) { if (tmp = (char *)index(c, '\n')) *tmp= 0; *************** *** 694,700 **** aconf->status, aconf->host, aconf->passwd, aconf->name, aconf->port, Class(aconf)); } ! fclose(fd); check_class(); nextping = nextconnect = time(NULL); return (0); --- 695,701 ---- aconf->status, aconf->host, aconf->passwd, aconf->name, aconf->port, Class(aconf)); } ! close(fd); check_class(); nextping = nextconnect = time(NULL); return (0); diff -cr irc2.7.2g/ircd/s_conf.c irc2.7.2h/ircd/s_conf.circ2.7.2g/ircd/s_misc.c irc2.7.2h/ircd/s_misc.c *** irc2.7.2g/ircd/s_misc.c Wed Aug 12 04:47:50 1992 --- irc2.7.2h/ircd/s_misc.c Tue Mar 2 13:10:13 1993 *************** *** 31,36 **** --- 31,37 ---- #include "sys.h" #include "numeric.h" #include + #include #ifdef HPUX # include # define getrusage(a,b) syscall(SYS_GETRUSAGE, a, b) *************** *** 297,304 **** sptr->user->username, sptr->user->host); # else { ! FILE *userlogfile; ! struct stat stbuf; /* * This conditional makes the logfile active only after --- 298,305 ---- sptr->user->username, sptr->user->host); # else { ! int userlogfile; ! char linebuf[160]; /* * This conditional makes the logfile active only after *************** *** 310,325 **** * file in 3 seconds. -avalon (curtesy of wumpus) */ alarm(3); ! if (IsPerson(sptr) && !stat(FNAME_USERLOG, &stbuf) && ! (userlogfile = fopen(FNAME_USERLOG, "a"))) { alarm(0); ! fprintf(userlogfile, "%s (%3d:%02d:%02d): %s@%s\n", myctime(sptr->firsttime), on_for / 3600, (on_for % 3600)/60, on_for % 60, sptr->user->username, sptr->user->host); ! fclose(userlogfile); } alarm(0); /* Modification by stealth@caen.engin.umich.edu */ --- 311,327 ---- * file in 3 seconds. -avalon (curtesy of wumpus) */ alarm(3); ! if (IsPerson(sptr) && ! (userlogfile = open(FNAME_USERLOG, O_WRONLY|O_APPEND))) { alarm(0); ! sprintf(linebuf, "%s (%3d:%02d:%02d): %s@%s\n", myctime(sptr->firsttime), on_for / 3600, (on_for % 3600)/60, on_for % 60, sptr->user->username, sptr->user->host); ! write(userlogfile, linebuf, strlen(linebuf)); ! close(userlogfile); } alarm(0); /* Modification by stealth@caen.engin.umich.edu */ diff -cr irc2.7.2g/ircd/s_misc.c irc2.7.2h/ircd/s_misc.circ2.7.2g/ircd/s_msg.c irc2.7.2h/ircd/s_msg.c *** irc2.7.2g/ircd/s_msg.c Wed Aug 12 04:47:51 1992 --- irc2.7.2h/ircd/s_msg.c Wed Mar 24 13:29:04 1993 *************** *** 35,40 **** --- 35,41 ---- #include "msg.h" #include "channel.h" #include + #include #include #include #ifdef IDENT *************** *** 605,611 **** sendto_ops("Nick change collision from %s to %s(%s <- %s)", sptr->name, acptr->name, acptr->from->name, get_client_name(cptr, FALSE)); ! sendto_serv_butone(cptr, /* KILL old from outgoing servers */ ":%s KILL %s :%s (%s(%s) <- %s)", me.name, sptr->name, me.name, --- 606,612 ---- sendto_ops("Nick change collision from %s to %s(%s <- %s)", sptr->name, acptr->name, acptr->from->name, get_client_name(cptr, FALSE)); ! sendto_serv_butone(NULL, /* KILL old from outgoing servers */ ":%s KILL %s :%s (%s(%s) <- %s)", me.name, sptr->name, me.name, *************** *** 612,618 **** acptr->from->name, acptr->name, get_client_name(cptr, FALSE)); ! sendto_one(cptr, /* Kill new from incoming link */ ":%s KILL %s :%s (%s <- %s(%s))", me.name, acptr->name, me.name, --- 613,619 ---- acptr->from->name, acptr->name, get_client_name(cptr, FALSE)); ! sendto_serv_butone(NULL, /* Kill new from incoming link */ ":%s KILL %s :%s (%s <- %s(%s))", me.name, acptr->name, me.name, *************** *** 3203,3209 **** int parc; char *parv[]; { ! FILE *fptr; char line[80], *tmp; if (check_registered(sptr)) --- 3204,3210 ---- int parc; char *parv[]; { ! int fd; char line[80], *tmp; if (check_registered(sptr)) *************** *** 3221,3227 **** * 3 seconds. -avalon (curtesy of wumpus) */ alarm(3); ! if (!(fptr = fopen(MOTD, "r"))) { alarm(0); sendto_one(sptr, --- 3222,3228 ---- * 3 seconds. -avalon (curtesy of wumpus) */ alarm(3); ! if (!(fd = open(MOTD, O_RDONLY))) { alarm(0); sendto_one(sptr, *************** *** 3232,3238 **** alarm(0); sendto_one(sptr, ":%s NOTICE %s :MOTD - %s Message of the Day - ", me.name, parv[0], me.name); ! while (fgets(line, 80, fptr)) { if (tmp = (char *)index(line,'\n')) *tmp = '\0'; --- 3233,3239 ---- alarm(0); sendto_one(sptr, ":%s NOTICE %s :MOTD - %s Message of the Day - ", me.name, parv[0], me.name); ! while (dgets(fd, line, sizeof(line) - 1)) { if (tmp = (char *)index(line,'\n')) *tmp = '\0'; *************** *** 3243,3249 **** } sendto_one(sptr, ":%s NOTICE %s :* End of /MOTD command.", me.name, parv[0]); ! fclose(fptr); #endif return 0; } --- 3244,3250 ---- } sendto_one(sptr, ":%s NOTICE %s :* End of /MOTD command.", me.name, parv[0]); ! close(fd); #endif return 0; } diff -cr irc2.7.2g/Makefile irc2.7.2h/Makefile *** irc2.7.2g/Makefile Wed Aug 12 04:47:51 1992 --- irc2.7.2h/Makefile Wed Mar 24 13:29:04 1993 *************** *** 88,94 **** cd common;\ ${MAKE} build;\ cd ../ircd;\ ! ${MAKE} bindircd;\ authbind: echo "Building common";\ --- 88,94 ---- cd common;\ ${MAKE} build;\ cd ../ircd;\ ! ${MAKE} bindircd; authbind: echo "Building common";\ *************** *** 95,101 **** cd common;\ ${MAKE} build;\ cd ../ircd;\ ! ${MAKE} authbind;\ clean: ${RM} -f *~ #* core --- 95,101 ---- cd common;\ ${MAKE} build;\ cd ../ircd;\ ! ${MAKE} authbind; clean: ${RM} -f *~ #* core