diff -c -N -r irc2.8.21+CSr8/common/irc_sprintf.c irc2.8.21+CSr9/common/irc_sprintf.c *** irc2.8.21+CSr8/common/irc_sprintf.c Mon Jul 31 19:23:34 1995 --- irc2.8.21+CSr9/common/irc_sprintf.c Sat Aug 12 15:10:11 1995 *************** *** 4,9 **** --- 4,15 ---- #include "common.h" #include "sys.h" + #ifdef IRCII_KLUDGE + #define NEWLINE "\n" + #else + #define NEWLINE "\r\n" + #endif + /* the return value is the size of the string */ int irc_sprintf(outp,formp,in0p,in1p,in2p,in3p,in4p,in5p,in6p,in7p,in8p,in9p, in10p) *************** *** 95,97 **** --- 101,219 ---- in9p,in10p); return strlen(outp); } + + #ifdef DOG3 + + /* the return value is the size of the string */ + int format(outp,formp,in0p,in1p,in2p,in3p,in4p,in5p,in6p,in7p,in8p,in9p, + in10p) + char *outp; + char *formp; + char *in0p,*in1p,*in2p,*in3p,*in4p,*in5p,*in6p,*in7p,*in8p,*in9p,*in10p; + { + /* rp for Reading, wp for Writing, fp for the Format string */ + char *inp[11]; /* we could hack this if we know the format of the stack */ + register char *rp,*fp,*wp; + register char f; + register int i=0; + + inp[0]=in0p; inp[1]=in1p; inp[2]=in2p; inp[3]=in3p; inp[4]=in4p; + inp[5]=in5p; inp[6]=in6p; inp[7]=in7p; inp[8]=in8p; inp[9]=in9p; + inp[10]=in10p; + + fp = formp; + wp = outp; + + rp = inp[i]; /* start with the first input string */ + + /* just scan the format string and puke out whatever is necessary + along the way... */ + + while (f = *(fp++)) { + + if (f!= '%') *(wp++) = f; + else + switch (*(fp++)) { + register char g; + + case 's': /* put the most common case at the top */ + while (g = *(rp++)) *(wp++) = g; /* copy a string */ + rp = inp[++i]; /* get the next parameter */ + break; + case 'd': + { + register int myint,quotient; + register int write=0; + myint = (int)rp; + + if (myint > 999 || myint < 0) goto barf; + if(quotient=myint/100) { + *(wp++) = (char) (quotient + (int) '0'); + myint %=100; + *(wp++) = (char) (myint/10 + (int) '0'); + } + else { + myint %=100; + if (quotient = myint/10) + *(wp++) = (char) (quotient + (int)'0'); + } + myint %=10; + *(wp++) = (char) ((myint) + (int) '0'); + + rp = inp[++i]; + } + break; + case 'u': + { + register unsigned int myuint; + myuint = (unsigned int)rp; + + if (myuint < 100 || myuint > 999) goto barf; + + *(wp++) = (char) ((myuint / 100) + (unsigned int) '0'); + myuint %=100; + *(wp++) = (char) ((myuint / 10) + (unsigned int) '0'); + myuint %=10; + *(wp++) = (char) ((myuint) + (unsigned int) '0'); + + rp = inp[++i]; + } + break; + case '%': + *(wp++) = '%'; + break; + default: + /* oh shit */ + goto barf; + break; + } + } + #ifndef IRCII_KLUDGE + *(wp++) = '\r'; + #endif + *(wp++) = '\n'; + *wp = '\0'; /* leaves wp pointing to the terminating NULL in the string */ + { + register int len; + #ifndef IRCII_KLUDGE + if ((len = wp-outp) >= 510) len = 512; + outp[510] = '\r'; + #else + if ((len = wp-outp) >= 511) len = 512; + #endif + outp[511] = '\n'; outp[512] = '\0'; + return len; + + } + barf: + sprintf(outp,formp,in0p,in1p,in2p,in3p,in4p,in5p,in6p,in7p,in8p, + in9p,in10p); + strcat(outp,NEWLINE); + #ifndef IRCII_KLUDGE + outp[510] = '\r'; + #endif + outp[511] = '\n'; outp[512] = '\0'; + return strlen(outp); + } + + #endif diff -c -N -r irc2.8.21+CSr8/common/packet.c irc2.8.21+CSr9/common/packet.c *** irc2.8.21+CSr8/common/packet.c Mon Jul 31 16:20:29 1995 --- irc2.8.21+CSr9/common/packet.c Sat Aug 12 15:28:20 1995 *************** *** 83,89 **** while (--length >= 0) { #ifdef DOG3 ! register char *g; g = (*ch1 = *ch2++); #else --- 83,89 ---- while (--length >= 0) { #ifdef DOG3 ! register char g; g = (*ch1 = *ch2++); #else diff -c -N -r irc2.8.21+CSr8/common/parse.c irc2.8.21+CSr9/common/parse.c *** irc2.8.21+CSr8/common/parse.c Mon Jul 31 16:20:29 1995 --- irc2.8.21+CSr9/common/parse.c Sat Aug 12 15:31:18 1995 *************** *** 487,496 **** --- 487,528 ---- aClient *cptr, *sptr; char *cmd; { + /* Basically let's just ignore everything...nothing + will get passed on, so it's most likely safe to do this + - Comstud + */ + if (IsServer(sptr) || IsMe(sptr)) + { + sendto_ops("Message from %s came from wrong direction", + sptr->name); + sendto_ops("Not dropping link: %s", cptr->name); + return -1; + } + if (IsServer(cptr)) + { + sendto_ops("Message from %s!%s@%s came from wrong direction", + sptr->name, + sptr->user ? sptr->user->username : "unknown", + sptr->user ? sptr->user->host : "unknown"); + sendto_ops("Not killing client: %s", sptr->name); + return -1; + } + /* Fake prefix came from a client of mine...something is screwed + with it, so we can exit this one + */ + return exit_client(cptr, cptr, &me, "Fake prefix"); + } + + static int av_cancel_clients(cptr, sptr, cmd) + aClient *cptr, *sptr; + char *cmd; + { /* * kill all possible points that are causing confusion here, * I'm not sure I've got this all right... * - avalon + * No, i don't think you do + * - comstud */ sendto_ops("Message (%s) for %s[%s!%s@%s] from %s", cmd, sptr->name, sptr->from->name, sptr->from->username, *************** *** 502,508 **** */ if (IsServer(sptr) || IsMe(sptr)) { ! sendto_ops("Dropping server %s", cptr->name); return exit_client(cptr, cptr, &me, "Fake Direction"); } /* --- 534,540 ---- */ if (IsServer(sptr) || IsMe(sptr)) { ! sendto_ops("Fake Direction: Not dropping: %s", cptr->name); return exit_client(cptr, cptr, &me, "Fake Direction"); } /* *************** *** 533,538 **** --- 565,572 ---- */ if (!IsServer(cptr)) return; + sendto_ops("Unknown sender %s came from %s", sender, + get_client_name(cptr, TRUE)); /* * Do kill if it came from a server because it means there is a ghost * user on the other server which needs to be removed. -avalon diff -c -N -r irc2.8.21+CSr8/common/send.c irc2.8.21+CSr9/common/send.c *** irc2.8.21+CSr8/common/send.c Mon Jul 31 16:20:29 1995 --- irc2.8.21+CSr9/common/send.c Sat Aug 12 13:32:47 1995 *************** *** 407,412 **** --- 407,416 ---- # endif Reg1 int i; Reg2 aClient *cptr; + #ifdef DOG3 + register int j,k=0; + fdlist send_fdlist; + #endif # ifdef USE_VARARGS va_start(vl); *************** *** 416,434 **** --- 420,454 ---- check_command((long)2, pattern, p1, p2, p3); # endif + #ifdef DOG3 + for (i=serv_fdlist.entry[j=1];j<=serv_fdlist.last_entry; + i=serv_fdlist.entry[++j]) + #else for (i = 0; i <= highest_fd; i++) + #endif { if (!(cptr = local[i]) || (one && cptr == one->from)) continue; + #ifndef DOG3 if (IsServer(cptr)) + #endif # ifdef USE_VARARGS sendto_one(cptr, pattern, vl); } va_end(vl); # else + #ifdef DOG3 + send_fdlist.entry[++k] = i; + #else sendto_one(cptr, pattern, p1, p2, p3, p4, p5, p6, p7, p8); + #endif /* DOG3 */ } + #ifdef DOG3 + send_fdlist.last_entry = k; + if (k) + sendto_fdlist(&send_fdlist,pattern,p1,p2,p3,p4,p5,p6,p7,p8); + #endif /* DOG3 */ # endif return; } *************** *** 584,589 **** --- 604,613 ---- Reg1 int i; Reg2 aClient *cptr; char *mask; + #ifdef DOG3 + register int j,k=0; + fdlist send_fdlist; + #endif #ifdef USE_VARARGS va_start(vl); *************** *** 602,614 **** --- 626,651 ---- else mask = (char *)NULL; + #ifdef DOG3 + for (i=serv_fdlist.entry[j=1];j<=serv_fdlist.last_entry; + i=serv_fdlist.entry[++j]) + #else for (i = 0; i <= highest_fd; i++) + #endif { if (!(cptr = local[i])) continue; + #ifdef DOG3 + if (cptr == from) + #else if ((cptr == from) || !IsServer(cptr)) + #endif continue; + #ifdef DOG3 + if (!BadPtr(mask) && + #else if (!BadPtr(mask) && IsServer(cptr) && + #endif matches(mask, cptr->name)) continue; #ifdef USE_VARARGS *************** *** 616,623 **** --- 653,669 ---- } va_end(vl); #else + #ifdef DOG3 + send_fdlist.entry[++k] = i; + #else sendto_one(cptr, format, p1, p2, p3, p4, p5, p6, p7, p8, p9); + #endif } + #ifdef DOG3 + send_fdlist.last_entry=k; + if (k) + sendto_fdlist(&send_fdlist,format,p1,p2,p3,p4,p5,p6,p7,p8,p9); + #endif /* DOG3 */ #endif } *************** *** 973,975 **** --- 1019,1033 ---- sendto_one(to, pattern, par, p2, p3, p4, p5, p6, p7, p8); #endif } + + void sendto_fdlist(listp,formp,p1,p2,p3,p4,p5,p6,p7,p8,p9) + fdlist *listp; + char *formp; + char *p1,*p2,*p3,*p4,*p5,*p6,*p7,*p8,*p9; + { + register int len,j,i,fd; + len = format(sendbuf,formp,p1,p2,p3,p4,p5,p6,p7,p8,p9); + + for(fd=listp->entry[j=1]; j<= listp->last_entry ; fd=listp->entry[++j]) + send_message(local[fd],sendbuf,len); + } diff -c -N -r irc2.8.21+CSr8/include/comstud.h irc2.8.21+CSr9/include/comstud.h *** irc2.8.21+CSr8/include/comstud.h Sat Aug 12 11:55:12 1995 --- irc2.8.21+CSr9/include/comstud.h Mon Aug 14 16:13:53 1995 *************** *** 1,6 **** --- 1,19 ---- #ifndef COMSTUD_H #define COMSTUD_H + /* DOG3 - define this if you want to use 'leet + dog3 super stuff + */ + + #define DOG3 + + /* DOUGH_HASH - define this if you want to use no_nick's + hashing routines...(suggested) + */ + + #define DOUGH_HASH + + /* DBUF_TAIL - define this if you'd like to use improved performance dealing with dbufs... */ *************** *** 158,164 **** want them logged */ ! #define FNAME_FAILED_OPER "/home/irc/irc2.8.21+CSr8/lib/logs/failed.log" /* CLIENT_NOTICES - define this if you wish to see client connecting and exiting notices via /umode +c --- 171,177 ---- want them logged */ ! #define FNAME_FAILED_OPER "/home/irc/irc2.8.21+CSr9/lib/logs/failed.log" /* CLIENT_NOTICES - define this if you wish to see client connecting and exiting notices via /umode +c *************** *** 242,248 **** and you wish to log clones */ ! #define FNAME_CLONELOG "/home/irc/irc2.8.21+CSr8/logs/clones.log" /* DEFAULT_IDLELIMIT - if you have CHECK_IDLE defined above, this value is the default # a client --- 255,261 ---- and you wish to log clones */ ! #define FNAME_CLONELOG "/home/irc/irc2.8.21+CSr9/logs/clones.log" /* DEFAULT_IDLELIMIT - if you have CHECK_IDLE defined above, this value is the default # a client diff -c -N -r irc2.8.21+CSr8/include/config.h irc2.8.21+CSr9/include/config.h *** irc2.8.21+CSr8/include/config.h Mon Jul 31 16:20:52 1995 --- irc2.8.21+CSr9/include/config.h Mon Aug 14 16:14:06 1995 *************** *** 26,31 **** --- 26,36 ---- #undef COMSTUD_DEBUG + #ifdef DOG3 + #include "dog3.h" + #endif + + /* Type of host. These should be made redundant somehow. -avalon */ /* BSD Nothing Needed 4.{2,3} BSD, SunOS 3.x, 4.x */ *************** *** 102,109 **** * these are only the recommened names and paths. Change as needed. * You must define these to something, even if you don't really want them. */ ! #define DPATH "/home/irc/irc2.8.21+CSr8/lib" /* dir where all ircd stuff is */ ! #define SPATH "/home/irc/irc2.8.21+CSr8/lib/ircd" #define CPATH "ircd.conf" /* server configuration file */ #define MPATH "ircd.motd" /* server MOTD file */ #define LPATH "ircd.log" /* Where the debug file lives, if DEBUGMODE */ --- 107,114 ---- * these are only the recommened names and paths. Change as needed. * You must define these to something, even if you don't really want them. */ ! #define DPATH "/home/irc/irc2.8.21+CSr9/lib" /* dir where all ircd stuff is */ ! #define SPATH "/home/irc/irc2.8.21+CSr9/lib/ircd" #define CPATH "ircd.conf" /* server configuration file */ #define MPATH "ircd.motd" /* server MOTD file */ #define LPATH "ircd.log" /* Where the debug file lives, if DEBUGMODE */ *************** *** 117,124 **** * successful use of /oper. These are either full paths or files within DPATH. */ ! #define FNAME_USERLOG "/home/irc/irc2.8.21+CSr8/logs/users.log" /* */ ! #define FNAME_OPERLOG "/home/irc/irc2.8.21+CSr8/logs/opers.log" /* */ /* CHROOTDIR * --- 122,129 ---- * successful use of /oper. These are either full paths or files within DPATH. */ ! #define FNAME_USERLOG "/home/irc/irc2.8.21+CSr9/logs/users.log" /* */ ! #define FNAME_OPERLOG "/home/irc/irc2.8.21+CSr9/logs/opers.log" /* */ /* CHROOTDIR * diff -c -N -r irc2.8.21+CSr8/include/dbuf.h irc2.8.21+CSr9/include/dbuf.h *** irc2.8.21+CSr8/include/dbuf.h Mon Jul 31 16:20:29 1995 --- irc2.8.21+CSr9/include/dbuf.h Sat Aug 12 13:00:20 1995 *************** *** 77,83 **** typedef struct dbufbuf { struct dbufbuf *next; /* Next data buffer, NULL if this is last */ ! char data[4080]; /* Actual data stored here */ } dbufbuf; /* --- 77,83 ---- typedef struct dbufbuf { struct dbufbuf *next; /* Next data buffer, NULL if this is last */ ! char data[4092]; /* Actual data stored here */ } dbufbuf; /* diff -c -N -r irc2.8.21+CSr8/include/dog3.h irc2.8.21+CSr9/include/dog3.h *** irc2.8.21+CSr8/include/dog3.h Wed Dec 31 19:00:00 1969 --- irc2.8.21+CSr9/include/dog3.h Sat Aug 12 14:09:44 1995 *************** *** 0 **** --- 1,13 ---- + #ifndef DOG3_H + #define DOG3_H + + #ifndef TRUE + #define TRUE 1 + #endif + + #define LOADCFREQ 5 + #define LOADRECV 35 + #define FDLISTCHKFREQ 2 + + #endif + diff -c -N -r irc2.8.21+CSr8/include/fdlist.h irc2.8.21+CSr9/include/fdlist.h *** irc2.8.21+CSr8/include/fdlist.h Wed Dec 31 19:00:00 1969 --- irc2.8.21+CSr9/include/fdlist.h Sat Aug 12 16:33:11 1995 *************** *** 0 **** --- 1,13 ---- + #ifndef _IRCD_DOG3_FDLIST + #define _IRCD_DOG3_FDLIST + + typedef struct fdstruct { + int entry [MAXCONNECTIONS+2]; + int last_entry; + } fdlist; + /* + void addto_fdlist( int a, fdlisttype *b); + void delfrom_fdlist( int a, fdlisttype *b); + void init_fdlist(fdlisttype *b); + */ + #endif /* _IRCD_DOG3_FDLIST */ diff -c -N -r irc2.8.21+CSr8/include/h.h irc2.8.21+CSr9/include/h.h *** irc2.8.21+CSr8/include/h.h Mon Jul 31 16:20:29 1995 --- irc2.8.21+CSr9/include/h.h Sun Aug 13 23:04:47 1995 *************** *** 26,31 **** --- 26,40 ---- #include "comstud.h" + #ifdef DOG3 + #include "fdlist.h" + extern fdlist serv_fdlist; + extern fdlist busycli_fdlist; /* high-priority clients */ + extern fdlist default_fdlist; /* just the number of the entry */ + extern fdlist auth_fdlist; + extern int lifesux; + #endif + #ifdef CLONE_CHECK extern aClone *Clones; extern aClone *make_clone PROTO(()); *************** *** 106,112 **** --- 115,125 ---- extern int get_sockerr PROTO((aClient *)); extern int inetport PROTO((aClient *, char *, int)); extern void init_sys PROTO(()); + #ifdef DOG3 + extern int read_message PROTO((time_t, fdlist *)); + #else extern int read_message PROTO((time_t)); + #endif extern void report_error PROTO((char *, aClient *)); extern void set_non_blocking PROTO((int, aClient *)); extern int setup_ping PROTO(()); *************** *** 167,172 **** --- 180,188 ---- extern int do_numeric PROTO((int, aClient *, aClient *, int, char **)); extern int hunt_server PROTO((aClient *,aClient *,char *,int,int,char **)); extern aClient *next_client PROTO((aClient *, char *)); + #ifdef DOG3 + extern aClient *next_client_double PROTO((aClient *, char *)); + #endif #ifndef CLIENT_COMPILE extern int m_umode PROTO((aClient *, aClient *, int, char **)); extern int m_names PROTO((aClient *, aClient *, int, char **)); diff -c -N -r irc2.8.21+CSr8/include/numeric.h irc2.8.21+CSr9/include/numeric.h *** irc2.8.21+CSr8/include/numeric.h Mon Jul 31 16:20:29 1995 --- irc2.8.21+CSr9/include/numeric.h Sat Aug 12 13:38:16 1995 *************** *** 17,22 **** --- 17,26 ---- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ + #ifdef DOG3 + # define RPL_LOAD2HI 263 + #endif + #ifdef TOPIC_INFO # define RPL_TOPICWHOTIME 333 #endif diff -c -N -r irc2.8.21+CSr8/include/patchlevel.h irc2.8.21+CSr9/include/patchlevel.h *** irc2.8.21+CSr8/include/patchlevel.h Mon Jul 31 16:20:52 1995 --- irc2.8.21+CSr9/include/patchlevel.h Sat Aug 12 12:02:33 1995 *************** *** 17,21 **** */ #ifndef PATCHLEVEL ! #define PATCHLEVEL "2.8.21+CSr8" #endif --- 17,21 ---- */ #ifndef PATCHLEVEL ! #define PATCHLEVEL "2.8.21+CSr9" #endif diff -c -N -r irc2.8.21+CSr8/include/struct.h irc2.8.21+CSr9/include/struct.h *** irc2.8.21+CSr8/include/struct.h Mon Jul 31 16:20:29 1995 --- irc2.8.21+CSr9/include/struct.h Sat Aug 12 13:40:29 1995 *************** *** 355,360 **** --- 355,364 ---- long sendM; /* Statistics: protocol messages send */ long sendK; /* Statistics: total k-bytes send */ long receiveM; /* Statistics: protocol messages received */ + #ifdef DOG3 + long lastrecvM; /* to check for activity --Mika */ + int priority; + #endif long receiveK; /* Statistics: total k-bytes received */ u_short sendB; /* counters to count upto 1-k lots of bytes */ u_short receiveB; /* sent and received. */ diff -c -N -r irc2.8.21+CSr8/ircd/Makefile irc2.8.21+CSr9/ircd/Makefile *** irc2.8.21+CSr8/ircd/Makefile Mon Jul 31 16:20:29 1995 --- irc2.8.21+CSr9/ircd/Makefile Sat Aug 12 16:00:38 1995 *************** *** 83,89 **** OBJS=channel.o class.o hash.o ircd.o list.o res.o s_auth.o s_bsd.o s_conf.o \ s_debug.o s_err.o s_misc.o s_numeric.o s_serv.o s_user.o whowas.o \ ! note.o clone.o $(RES) $(COMMONOBJS) SRC=$(OBJS:%.o=%.c) --- 83,89 ---- OBJS=channel.o class.o hash.o ircd.o list.o res.o s_auth.o s_bsd.o s_conf.o \ s_debug.o s_err.o s_misc.o s_numeric.o s_serv.o s_user.o whowas.o \ ! note.o clone.o fdlist.o $(RES) $(COMMONOBJS) SRC=$(OBJS:%.o=%.c) diff -c -N -r irc2.8.21+CSr8/ircd/channel.c irc2.8.21+CSr9/ircd/channel.c *** irc2.8.21+CSr8/ircd/channel.c Mon Jul 31 16:20:29 1995 --- irc2.8.21+CSr9/ircd/channel.c Sat Aug 12 13:42:35 1995 *************** *** 1843,1848 **** --- 1843,1855 ---- aChannel *chptr; char *name, *p = NULL; + if (lifesux && !IsAnOper(sptr)) + { + sendto_one(sptr, rpl_str(RPL_LOAD2HI), me.name, + parv[0]); + return 0; + } + sendto_one(sptr, rpl_str(RPL_LISTSTART), me.name, parv[0]); if (parc < 2 || BadPtr(parv[1])) diff -c -N -r irc2.8.21+CSr8/ircd/chkconf.c irc2.8.21+CSr9/ircd/chkconf.c *** irc2.8.21+CSr8/ircd/chkconf.c Mon Jul 31 16:20:30 1995 --- irc2.8.21+CSr9/ircd/chkconf.c Sat Aug 12 13:44:12 1995 *************** *** 154,164 **** if (aconf) { if (aconf->host) ! (void)free(aconf->host); if (aconf->passwd) ! (void)free(aconf->passwd); if (aconf->name) ! (void)free(aconf->name); } else aconf = (aConfItem *)malloc(sizeof(*aconf)); --- 154,164 ---- if (aconf) { if (aconf->host) ! (void)MyFree(aconf->host); if (aconf->passwd) ! (void)MyFree(aconf->passwd); if (aconf->name) ! (void)MyFree(aconf->name); } else aconf = (aConfItem *)malloc(sizeof(*aconf)); *************** *** 437,443 **** len += strlen(aconf->host); newhost = (char *)MyMalloc(len); (void)irc_sprintf(newhost, "*@%s", aconf->host); ! (void)free(aconf->host); aconf->host = newhost; } --- 437,443 ---- len += strlen(aconf->host); newhost = (char *)MyMalloc(len); (void)irc_sprintf(newhost, "*@%s", aconf->host); ! (void)MyFree(aconf->host); aconf->host = newhost; } *************** *** 503,511 **** { numclasses++; if (classarr) ! classarr = (int *)realloc(classarr, sizeof(int) * numclasses); else ! classarr = (int *)malloc(sizeof(int)); classarr[numclasses-1] = cn; } --- 503,511 ---- { numclasses++; if (classarr) ! classarr = (int *)MyRealloc(classarr, sizeof(int) * numclasses); else ! classarr = (int *)MyMalloc(sizeof(int)); classarr[numclasses-1] = cn; } diff -c -N -r irc2.8.21+CSr8/ircd/clone.c irc2.8.21+CSr9/ircd/clone.c *** irc2.8.21+CSr8/ircd/clone.c Mon Jul 31 16:20:30 1995 --- irc2.8.21+CSr9/ircd/clone.c Sat Aug 12 17:20:55 1995 *************** *** 7,12 **** --- 7,14 ---- # include "malloc.h" #endif + #include "comstud.h" + #ifdef CLONE_CHECK /* ** Create Clone structure diff -c -N -r irc2.8.21+CSr8/ircd/fdlist.c irc2.8.21+CSr9/ircd/fdlist.c *** irc2.8.21+CSr8/ircd/fdlist.c Wed Dec 31 19:00:00 1969 --- irc2.8.21+CSr9/ircd/fdlist.c Sat Aug 12 16:01:14 1995 *************** *** 0 **** --- 1,56 ---- + /* fdlist.c maintain lists of certain important fds */ + + #include "config.h" + #include "fdlist.h" + + #ifdef DOG3 + + void addto_fdlist(fd,listp) + int fd; + fdlist *listp; + { + register int index; + if ( (index = ++listp->last_entry) >= MAXCONNECTIONS) { + /* list too big.. must exit */ + --listp->last_entry; + exit(-1); + } + else + listp->entry[index] = fd; + return; + } + + void delfrom_fdlist(fd,listp) + int fd; + fdlist *listp; + { + register int i; + for (i=listp->last_entry; i ; i--) { + if (listp->entry[i]==fd) break; + } + if (!i) return; /* could not find it! */ + /* swap with last_entry */ + if (i==listp->last_entry) { + listp->entry[i] =0; + listp->last_entry--; + return; + } + else { + listp->entry[i] = listp->entry[listp->last_entry]; + listp->entry[listp->last_entry] = 0; + listp->last_entry--; + return; + } + } + + void init_fdlist(listp) + fdlist *listp; + { + register int i; + listp->last_entry=0; + for (i=0; ientry[i] = 0; + return; + } + + #endif diff -c -N -r irc2.8.21+CSr8/ircd/hash.c irc2.8.21+CSr9/ircd/hash.c *** irc2.8.21+CSr8/ircd/hash.c Mon Jul 31 16:20:30 1995 --- irc2.8.21+CSr9/ircd/hash.c Mon Aug 14 00:38:33 1995 *************** *** 26,31 **** --- 26,41 ---- #include "hash.h" #include "h.h" + #ifdef DOUGH_HASH + #define MAX_INITIAL 1024 + #define MAX_INITIAL_MASK 0x3ff + + #define BITS_PER_COL 3 + #define BITS_PER_COL_MASK 0x7 + #define MAX_SUB (1<> 1) + lower; + nname++; + } + ret = ((hash & MAX_INITIAL_MASK) << BITS_PER_COL) + + (hash2 & BITS_PER_COL_MASK); + return ret; + } + + #else + /* * hash_nick_name * *************** *** 95,100 **** --- 132,139 ---- return (hash); } + #endif + /* * hash_channel_name * *************** *** 660,667 **** l = atoi(parv[2]); if (l < 256) return 0; ! (void)free((char *)clientTable); ! clientTable = (aHashEntry *)malloc(sizeof(aHashEntry) * l); HASHSIZE = l; clear_client_hash_table(); for (acptr = client; acptr; acptr = acptr->next) --- 699,706 ---- l = atoi(parv[2]); if (l < 256) return 0; ! (void)MyFree((char *)clientTable); ! clientTable = (aHashEntry *)MyMalloc(sizeof(aHashEntry) * l); HASHSIZE = l; clear_client_hash_table(); for (acptr = client; acptr; acptr = acptr->next) *************** *** 681,688 **** l = atoi(parv[2]); if (l < 256) return 0; ! (void)free((char *)channelTable); ! channelTable = (aHashEntry *)malloc(sizeof(aHashEntry) * l); CHANNELHASHSIZE = l; clear_channel_hash_table(); for (acptr = channel; acptr; acptr = acptr->nextch) --- 720,727 ---- l = atoi(parv[2]); if (l < 256) return 0; ! (void)MyFree((char *)channelTable); ! channelTable = (aHashEntry *)MyMalloc(sizeof(aHashEntry) * l); CHANNELHASHSIZE = l; clear_channel_hash_table(); for (acptr = channel; acptr; acptr = acptr->nextch) diff -c -N -r irc2.8.21+CSr8/ircd/ircd.c irc2.8.21+CSr9/ircd/ircd.c *** irc2.8.21+CSr8/ircd/ircd.c Thu Aug 10 23:21:17 1995 --- irc2.8.21+CSr9/ircd/ircd.c Mon Aug 14 16:16:22 1995 *************** *** 36,41 **** --- 36,56 ---- #include #include "h.h" + #ifdef DOG3 + + #include "dog3.h" + #include "fdlist.h" + + fdlist serv_fdlist; + fdlist busycli_fdlist; /* high-priority clients */ + fdlist default_fdlist; /* just the number of the entry */ + fdlist auth_fdlist; + int lifesux = 0; + + time_t check_fdlists(); + + #endif /* DOG3 */ + #ifdef CLONE_CHECK aClone *Clones = NULL; char clonekillhost[100]; *************** *** 472,478 **** uid_t uid, euid; time_t delay = 0, now; struct rlimit r; ! #ifdef DBUF_INIT dbuf_init(); /* set up some dbuf stuff to control paging */ #endif --- 487,497 ---- uid_t uid, euid; time_t delay = 0, now; struct rlimit r; ! #ifdef DOG3 ! int mainloops=0; /* counter of how many times we have gone through ! the main loop */ ! time_t nextfdlistcheck=0; /*end of priority code */ ! #endif #ifdef DBUF_INIT dbuf_init(); /* set up some dbuf stuff to control paging */ #endif *************** *** 654,659 **** --- 673,689 ---- initwhowas(); initstats(); open_debugfile(); + #ifdef DOG3 + init_fdlist(&serv_fdlist); + init_fdlist(&busycli_fdlist); + init_fdlist(&default_fdlist); + init_fdlist(&auth_fdlist); + { + register int i; + for (i=MAXCONNECTIONS+1 ; i>0 ; i--) + default_fdlist.entry[i] = i-1; + } + #endif if (portnum < 0) portnum = PORTNUM; me.port = portnum; *************** *** 726,735 **** #ifdef USE_SYSLOG syslog(LOG_NOTICE, "Server Ready"); #endif ! for (;;) { now = time(NULL); /* ** We only want to connect if a connection is due, ** not every time through. Note, if there are no --- 756,802 ---- #ifdef USE_SYSLOG syslog(LOG_NOTICE, "Server Ready"); #endif ! #ifdef DOG3 ! check_fdlists(time(NULL)); ! #endif for (;;) { now = time(NULL); + #ifdef DOG3 + { + static time_t lasttime=0; + static long lastrecvK; + static int init=0; + static time_t loadcfreq=LOADCFREQ; + + if (now-lasttime < loadcfreq) + goto done_check; + lasttime = now; + if (me.receiveK - LOADRECV > lastrecvK) + { + if (!lifesux) + { + loadcfreq *= 2; /* add hysteresis */ + lifesux = TRUE; + sendto_ops("Entering high-traffic mode"); + } + } + else + { + loadcfreq = LOADCFREQ; + if (lifesux) + { + lifesux = 0; + sendto_ops("Resuming standard operation"); + } + } + lastrecvK = me.receiveK; + done_check: + ; + } + #endif /* DOG3 */ + + /* ** We only want to connect if a connection is due, ** not every time through. Note, if there are no *************** *** 770,777 **** delay = 1; else delay = MIN(delay, TIMESEC); (void)read_message(delay); ! Debug((DEBUG_DEBUG ,"Got message(s)")); now = time(NULL); --- 837,859 ---- delay = 1; else delay = MIN(delay, TIMESEC); + #ifndef DOG3 (void)read_message(delay); ! #else ! (void)read_message(0,&serv_fdlist); /* servers */ ! (void)read_message(1,&busycli_fdlist); /* busy clients */ ! if (lifesux) ! (void)read_message(1,&serv_fdlist); ! /* read servs more often */ ! { ! static time_t lasttime=0; ! if ((lasttime + (lifesux +1) * 2)< (now = time(NULL))) ! { ! read_message(delay,NULL); /* check everything! */ ! lasttime = now; ! } ! } ! #endif Debug((DEBUG_DEBUG ,"Got message(s)")); now = time(NULL); *************** *** 783,789 **** --- 865,875 ---- ** time might be too far away... (similarly with ** ping times) --msa */ + #ifdef DOG3 + if (now >= nextping && !lifesux) + #else if (now >= nextping) + #endif nextping = check_pings(now); if (dorehash) *************** *** 797,802 **** --- 883,893 ---- ** -avalon */ flush_connections(me.fd); + #ifdef DOG3 + /* check which clients are active */ + if (now > nextfdlistcheck) + nextfdlistcheck = check_fdlists(now); + #endif } } *************** *** 910,912 **** --- 1001,1041 ---- (void)siginterrupt(SIGALRM, 1); #endif } + + #ifdef DOG3 + time_t check_fdlists(now) + time_t now; + { + register aClient *cptr; + int pri; /* temp. for priority */ + register int i,j; + j = 0; + + for(i=highest_fd;i>=0; i--) + { + if (!(cptr=local[i])) + continue; + if (IsServer(cptr) || IsListening(cptr) || IsOper(cptr) || + DoingAuth(cptr)) + { + busycli_fdlist.entry[++j] = i; + continue; + } + pri = cptr->priority; + if (cptr->receiveM==cptr->lastrecvM) + pri+=2; /* lower a bit */ + else + pri-=30; + if (pri < 0) pri = 0; + if (pri > 80) pri = 80; + + cptr->lastrecvM = cptr->receiveM; + cptr->priority = pri; + if ((pri <10) || (!lifesux && (pri < 25))) + busycli_fdlist.entry[++j] = i; + } + busycli_fdlist.last_entry=j; /* rest of the fdlist is garbage */ + + return (now + FDLISTCHKFREQ + lifesux * FDLISTCHKFREQ); + } + #endif /* DOG3 */ diff -c -N -r irc2.8.21+CSr8/ircd/list.c irc2.8.21+CSr9/ircd/list.c *** irc2.8.21+CSr8/ircd/list.c Mon Jul 31 16:20:29 1995 --- irc2.8.21+CSr9/ircd/list.c Sat Aug 12 14:10:51 1995 *************** *** 300,306 **** Reg1 Link *lp; Reg2 aClient *ptr; { ! while (lp && ptr) { if (lp->value.cptr == ptr) return (lp); --- 300,307 ---- Reg1 Link *lp; Reg2 aClient *ptr; { ! if (ptr) ! while (lp) { if (lp->value.cptr == ptr) return (lp); diff -c -N -r irc2.8.21+CSr8/ircd/s_auth.c irc2.8.21+CSr9/ircd/s_auth.c *** irc2.8.21+CSr8/ircd/s_auth.c Mon Jul 31 16:20:29 1995 --- irc2.8.21+CSr9/ircd/s_auth.c Mon Aug 14 16:21:55 1995 *************** *** 202,208 **** break; strncpyzt(system, t, sizeof(system)); for (t = ruser; *s && (t < ruser + sizeof(ruser)); s++) ! if (!isspace(*s) && *s != ':') *t++ = *s; *t = '\0'; Debug((DEBUG_INFO,"auth reply ok [%s] [%s]", system, ruser)); --- 202,208 ---- break; strncpyzt(system, t, sizeof(system)); for (t = ruser; *s && (t < ruser + sizeof(ruser)); s++) ! if (!isspace(*s) && *s != ':' && *s != '@') *t++ = *s; *t = '\0'; Debug((DEBUG_INFO,"auth reply ok [%s] [%s]", system, ruser)); diff -c -N -r irc2.8.21+CSr8/ircd/s_bsd.c irc2.8.21+CSr9/ircd/s_bsd.c *** irc2.8.21+CSr8/ircd/s_bsd.c Mon Jul 31 16:20:30 1995 --- irc2.8.21+CSr9/ircd/s_bsd.c Mon Aug 14 16:22:25 1995 *************** *** 1050,1055 **** --- 1050,1063 ---- local[i] = local[j]; local[i]->fd = i; local[j] = NULL; + /* update server list */ + if (IsServer(local[i])) + { + delfrom_fdlist(j,&busycli_fdlist); + delfrom_fdlist(j,&serv_fdlist); + addto_fdlist(i,&busycli_fdlist); + addto_fdlist(i,&serv_fdlist); + } (void)close(j); while (!local[highest_fd]) highest_fd--; *************** *** 1449,1458 **** --- 1457,1472 ---- * processed. Also check for connections with data queued and whether we can * write it out. */ + #ifdef DOG3 + int read_message(delay, listp) + time_t delay; + fdlist *listp; + #else int read_message(delay) time_t delay; /* Don't ever use ZERO here, unless you mean to poll and then * you have to have sleep/wait somewhere else in the code.--msa */ + #endif { Reg1 aClient *cptr; Reg2 int nfds; *************** *** 1464,1471 **** fd_set read_set, write_set; time_t delay2 = delay, now; u_long usec = 0; ! int res, length, fd, i; int auth = 0; #ifdef NPATH check_command(&delay, NULL); --- 1478,1497 ---- fd_set read_set, write_set; time_t delay2 = delay, now; u_long usec = 0; ! int res, length, fd; int auth = 0; + register int i; + #ifdef DOG3 + register int j; + + /* if it is called with NULL we check all active fd's */ + if (!listp) + { + listp = &default_fdlist; + listp->last_entry = highest_fd+1; /* remember the 0th entry isnt used */ + } + + #endif #ifdef NPATH check_command(&delay, NULL); *************** *** 1482,1488 **** --- 1508,1519 ---- FD_ZERO(&read_set); FD_ZERO(&write_set); + #ifdef DOG3 + for (i=listp->entry[j=1];j<=listp->last_entry; + i=listp->entry[++j]) + #else for (i = highest_fd; i >= 0; i--) + #endif { if (!(cptr = local[i])) continue; *************** *** 1500,1506 **** continue; if (IsMe(cptr) && IsListening(cptr)) { ! if ((now > cptr->lasttime + 2)) FD_SET(i, &read_set); else if (delay2 > 2) delay2 = 2; --- 1531,1544 ---- continue; if (IsMe(cptr) && IsListening(cptr)) { ! #ifdef DOG3 ! /* next line was 2, changing to 1 */ ! /*if we dont have many clients just let em on */ ! if ((highest_fd < MAXCONNECTIONS /2 ) || ! (now > cptr->lasttime + 1)) ! #else ! if (now > (cptr->lasttime + 2)) ! #endif FD_SET(i, &read_set); else if (delay2 > 2) delay2 = 2; *************** *** 1576,1581 **** --- 1614,1620 ---- * because these can not be processed using the normal loops below. * -avalon */ + for (i = highest_fd; (auth > 0) && (i >= 0); i--) { if (!(cptr = local[i])) *************** *** 1594,1600 **** --- 1633,1644 ---- read_authports(cptr); } } + #ifdef DOG3 + for (i=listp->entry[j=1];j <= listp->last_entry; + i=listp->entry[++j]) + #else for (i = highest_fd; i >= 0; i--) + #endif if ((cptr = local[i]) && FD_ISSET(i, &read_set) && IsListening(cptr)) { *************** *** 1644,1650 **** --- 1688,1699 ---- cptr->acpt = &me; } + #ifdef DOG3 + for (i=listp->entry[j=1];j<=listp->last_entry; + i=listp->entry[++j]) + #else for (i = highest_fd; i >= 0; i--) + #endif { if (!(cptr = local[i]) || IsMe(cptr)) continue; *************** *** 1675,1682 **** --- 1724,1733 ---- length = 1; /* for fall through case */ if (!NoNewLine(cptr) || FD_ISSET(i, &read_set)) length = read_packet(cptr, &read_set); + #ifndef DOG3 if (length > 0) flush_connections(i); + #endif if ((length != FLUSH_BUFFER) && IsDead(cptr)) goto deadsocket; if (!FD_ISSET(i, &read_set) && length > 0) diff -c -N -r irc2.8.21+CSr8/ircd/s_conf.c irc2.8.21+CSr9/ircd/s_conf.c *** irc2.8.21+CSr8/ircd/s_conf.c Mon Jul 31 16:20:30 1995 --- irc2.8.21+CSr9/ircd/s_conf.c Sat Aug 12 14:35:15 1995 *************** *** 746,752 **** if (!*(tmp+1)) break; else ! for (s = tmp; *s = *(s+1); s++) ; } else if (*tmp == '#') --- 746,752 ---- if (!*(tmp+1)) break; else ! for (s = tmp; (*s = *(s+1)); s++) ; } else if (*tmp == '#') diff -c -N -r irc2.8.21+CSr8/ircd/s_debug.c irc2.8.21+CSr9/ircd/s_debug.c *** irc2.8.21+CSr8/ircd/s_debug.c Mon Jul 31 16:20:29 1995 --- irc2.8.21+CSr9/ircd/s_debug.c Sat Aug 12 16:12:07 1995 *************** *** 150,155 **** --- 150,158 ---- #ifdef HIGHEST_CONNECTON 'h', #endif + #ifdef DOUGH_HASH + 'H', + #endif #ifdef REJECT_IPHONE 'i', #endif *************** *** 197,203 **** #ifdef USERNAMES_IN_TRACE 'u', #endif ! '\0'}; #include "numeric.h" --- 200,208 ---- #ifdef USERNAMES_IN_TRACE 'u', #endif ! #ifdef DOG3 ! '3', ! #endif '\0'}; #include "numeric.h" diff -c -N -r irc2.8.21+CSr8/ircd/s_err.c irc2.8.21+CSr9/ircd/s_err.c *** irc2.8.21+CSr8/ircd/s_err.c Mon Jul 31 16:20:30 1995 --- irc2.8.21+CSr9/ircd/s_err.c Sat Aug 12 20:36:24 1995 *************** *** 225,231 **** /* 202 */ RPL_TRACEHANDSHAKE, "H.S. %d %s", /* 203 */ RPL_TRACEUNKNOWN, "???? %d %s", /* 204 */ RPL_TRACEOPERATOR, "Oper %d %s", ! /* 205 */ RPL_TRACEUSER, "User %d %s", /* 206 */ RPL_TRACESERVER, "Serv %d %dS %dC %s %s!%s@%s", /* 207 */ RPL_TRACESERVICE, "Service %d %s", /* 208 */ RPL_TRACENEWTYPE, " 0 %s", --- 225,231 ---- /* 202 */ RPL_TRACEHANDSHAKE, "H.S. %d %s", /* 203 */ RPL_TRACEUNKNOWN, "???? %d %s", /* 204 */ RPL_TRACEOPERATOR, "Oper %d %s", ! /* 205 */ RPL_TRACEUSER, "User %d %s %d %d", /* 206 */ RPL_TRACESERVER, "Serv %d %dS %dC %s %s!%s@%s", /* 207 */ RPL_TRACESERVICE, "Service %d %s", /* 208 */ RPL_TRACENEWTYPE, " 0 %s", *************** *** 277,283 **** /* 259 */ RPL_ADMINEMAIL, ":%s", 0, (char *)NULL, /* 261 */ RPL_TRACELOG, "File %s %d", ! 0, (char *)NULL }; char *err_str(numeric) --- 277,284 ---- /* 259 */ RPL_ADMINEMAIL, ":%s", 0, (char *)NULL, /* 261 */ RPL_TRACELOG, "File %s %d", ! 0, (char *)NULL, ! /* 263 */ RPL_LOAD2HI, ":Server load too high, try again in a while" }; char *err_str(numeric) diff -c -N -r irc2.8.21+CSr8/ircd/s_misc.c irc2.8.21+CSr9/ircd/s_misc.c *** irc2.8.21+CSr8/ircd/s_misc.c Mon Jul 31 16:20:29 1995 --- irc2.8.21+CSr9/ircd/s_misc.c Sat Aug 12 15:17:35 1995 *************** *** 348,353 **** --- 348,357 ---- if (MyConnect(sptr)) { + #ifdef DOG3 + if(IsServer(sptr)) + delfrom_fdlist(sptr->fd,&serv_fdlist); + #endif sptr->flags |= FLAGS_CLOSING; #ifdef CLIENT_NOTICES if (IsPerson(sptr)) diff -c -N -r irc2.8.21+CSr8/ircd/s_serv.c irc2.8.21+CSr9/ircd/s_serv.c *** irc2.8.21+CSr8/ircd/s_serv.c Mon Jul 31 16:20:52 1995 --- irc2.8.21+CSr9/ircd/s_serv.c Sat Aug 12 20:38:27 1995 *************** *** 41,46 **** --- 41,50 ---- #include #include "h.h" + #ifdef DOG3 + extern time_t check_fdlists(); + #endif + static char buf[BUFSIZE]; #ifdef HIGHEST_CONNECTION *************** *** 643,648 **** --- 647,658 ---- ** code is more neat this way... --msa */ SetServer(cptr); + #ifdef DOG3 + /* adds to fdlist */ + addto_fdlist(cptr->fd,&serv_fdlist); + /* this causes the server to be marked as "busy" */ + check_fdlists(time(NULL)); + #endif nextping = time(NULL); sendto_ops("Link with %s established.", inpath); (void)add_to_client_hash_table(cptr->name, cptr); *************** *** 1287,1292 **** --- 1297,1310 ---- if(hunt_server(cptr, sptr, ":%s LUSERS %s :%s", 2, parc, parv) != HUNTED_ISME) return 0; + #ifdef DOG3 + /* this is to reduce load while connecting */ + if (lifesux && !IsAnOper(sptr)) + { + sendto_one(sptr,rpl_str(RPL_LOAD2HI),me.name,parv[0]); + return 0; + } + #endif (void)collapse(parv[1]); for (acptr = client; acptr; acptr = acptr->next) *************** *** 1900,1905 **** --- 1918,1924 ---- char *tname; int doall, link_s[MAXCONNECTIONS], link_u[MAXCONNECTIONS]; int cnt = 0, wilds, dow; + time_t now; if (check_registered(sptr)) return 0; *************** *** 1913,1926 **** tname = parv[1]; else tname = me.name; ! switch (hunt_server(cptr, sptr, ":%s TRACE :%s", 1, parc, parv)) { case HUNTED_PASS: /* note: gets here only if parv[1] exists */ { aClient *ac2ptr; ac2ptr = next_client(client, tname); sendto_one(sptr, rpl_str(RPL_TRACELINK), me.name, parv[0], version, debugmode, tname, ac2ptr->from->name); return 0; --- 1932,1949 ---- tname = parv[1]; else tname = me.name; ! now = time(NULL); switch (hunt_server(cptr, sptr, ":%s TRACE :%s", 1, parc, parv)) { case HUNTED_PASS: /* note: gets here only if parv[1] exists */ { aClient *ac2ptr; + #ifdef DOG3 + ac2ptr = next_client_double(client, tname); + #else ac2ptr = next_client(client, tname); + #endif sendto_one(sptr, rpl_str(RPL_TRACELINK), me.name, parv[0], version, debugmode, tname, ac2ptr->from->name); return 0; *************** *** 2006,2012 **** else sendto_one(sptr,rpl_str(RPL_TRACEUSER), me.name, parv[0], ! class, name); cnt++; } break; --- 2029,2037 ---- else sendto_one(sptr,rpl_str(RPL_TRACEUSER), me.name, parv[0], ! class, name, ! acptr->priority, ! now-acptr->lasttime); cnt++; } break; diff -c -N -r irc2.8.21+CSr8/ircd/s_user.c irc2.8.21+CSr9/ircd/s_user.c *** irc2.8.21+CSr8/ircd/s_user.c Mon Jul 31 16:20:52 1995 --- irc2.8.21+CSr9/ircd/s_user.c Sat Aug 12 15:05:04 1995 *************** *** 129,140 **** { if (IsService(next)) continue; ! if (!match(ch, next->name) || !matches(next->name, ch)) break; } return next; } /* ** hunt_server ** --- 129,170 ---- { if (IsService(next)) continue; ! #ifdef DOG3 ! if (!matches(ch, next->name)) ! #else ! if (!matches(ch, next->name) || !matches(next->name, ch)) ! #endif break; } return next; } + #ifdef DOG3 + + aClient *next_client_double(next, ch) + /* this slow version needs to be used for hostmasks *sigh * */ + Reg1 aClient *next; /* First client to check */ + Reg2 char *ch; /* search string (may include wilds) */ + { + Reg3 aClient *tmp = next; + + next = find_client(ch, tmp); + if (tmp && tmp->prev == next) + return NULL; + if (next != tmp) + return next; + for ( ; next; next = next->next) + { + if (IsService(next)) + continue; + if (!matches(ch,next->name) || !matches(next->name,ch)) + break; + } + return next; + } + + #endif + /* ** hunt_server ** *************** *** 1317,1323 **** --- 1347,1362 ---- found = 0; (void)collapse(nick); + #ifdef DOG3 + if (wilds = (index(nick, '?') || index(nick, '*'))) + if (lifesux && !IsAnOper(sptr)) + { + sendto_one(sptr,rpl_str(RPL_LOAD2HI),me.name,parv[0]); + return 0; + } + #else wilds = (index(nick, '?') || index(nick, '*')); + #endif for (acptr = client; (acptr = next_client(acptr, nick)); acptr = acptr->next) { *************** *** 1572,1583 **** --- 1611,1626 ---- #endif if (IsAnOper(cptr)) { + /* if (BadPtr(path)) { sendto_one(sptr, err_str(ERR_NEEDMOREPARAMS), me.name, parv[0], "KILL"); return 0; } + */ + if (BadPtr(path)) + path = parv[0]; if (strlen(path) > (size_t) TOPICLEN) path[TOPICLEN] = '\0'; } *************** *** 2175,2181 **** (void)irc_sprintf(buf, rpl_str(RPL_ISON), me.name, *parv); len = strlen(buf); ! for (s = strtoken(&p, *++pav, " "); s; s = strtoken(&p, NULL, " ")) if ((acptr = find_person(s, NULL))) { --- 2218,2226 ---- (void)irc_sprintf(buf, rpl_str(RPL_ISON), me.name, *parv); len = strlen(buf); ! #ifdef DOG3 ! cptr->priority +=30; /* this keeps it from moving to 'busy' list */ ! #endif for (s = strtoken(&p, *++pav, " "); s; s = strtoken(&p, NULL, " ")) if ((acptr = find_person(s, NULL))) { diff -c -N -r irc2.8.21+CSr8/ircd/version.c irc2.8.21+CSr9/ircd/version.c *** irc2.8.21+CSr8/ircd/version.c Wed Dec 31 19:00:00 1969 --- irc2.8.21+CSr9/ircd/version.c Mon Aug 14 00:48:58 1995 *************** *** 0 **** --- 1,77 ---- + /* + * IRC - Internet Relay Chat, ircd/version.c + * Copyright (C) 1990 Chelsea Ashley Dyerman + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 1, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + + /* + * This file is generated by version.c.SH. Any changes made will go away. + */ + + #include "struct.h" + #include "patchlevel.h" + + char *generation = "14"; + char *creation = "Sun Aug 13 1995 at 21:48:57 PDT"; + char *version = PATCHLEVEL; + + char *infotext[] = + { + "IRC --", + "Based on the original code written by Jarkko Oikarinen", + "Copyright 1988, 1989, 1990, 1991 University of Oulu, Computing Center", + "", + "This program is free software; you can redistribute it and/or", + "modify it under the terms of the GNU General Public License as", + "published by the Free Software Foundation; either version 1, or", + "(at your option) any later version.", + "", + "The following persons have made many changes and enhancements to the", + "code and still know how IRC really works if you have questions about it:", + "", + "Avalon Darren Reed avalon@coombs.anu.edu.au", + "msa Markku Savela Markku.Savela@vtt.fi", + "Wumpus Greg Lindahl gl8f@virginia.edu", + "WiZ Jarkko Oikarinen jto@tolsun.oulu.fi", + "Argv Armin Gruner Armin.Gruner@Informatik.TU-Muenchen.de", + "", + "Thanks to the following people for help with preparing 2.8", + "", + "phone Matthew Green phone@coombs.anu.edu.au", + "Sodapop Chuck Kane ckane@ece.uiuc.edu", + "Skygod Matt Lyle matt@oc.com", + "Vesa Vesa Ruokonen ruokonen@lut.fi", + "Nap Nicolas PIOCH pioch@poly.polytechnique.fr", + "", + "Those who helped in prior versions and continue to be helpful:", + "", + "Stellan Klebom Dan Goodwin Mike Bolotski", + "Ian Frechette Markku Jarvinen Kimmo Suominen", + "Jeff Trim Vijay Subramaniam Karl Kleinpaste", + "Bill Wisner Tom Davis Hugo Calendar", + "Tom Hopkins Stephen van den Berg", + "Bo Adler Michael Sandrof Jon Solomon", + "Jan Peterson Helen Rose Paul Graham", + "", + "Thanks also goes to those persons not mentioned here who have added", + "their advice, opinions, and code to IRC.", + "Thanks also to those who provide the kind sys admins who let me and", + "others continue to develop IRC.", + "", + "[38712 57] [12165 47] [19266 59] [09680 66]", + "[59728 18] [12523 19] [55469 26]", + 0, + };