diff -N -c -r irc2.8.21+CSr22/README.CS irc2.8.21+CSr23/README.CS *** irc2.8.21+CSr22/README.CS Sat Apr 27 21:41:40 1996 --- irc2.8.21+CSr23/README.CS Wed May 29 19:49:11 1996 *************** *** 1,6 **** --- 1,18 ---- NOTE: Please change values in comstud.h and dog3.h to your liking... The default values are probably less than ideal for you! + New in CSr23: + + 1) Changed the timing of the NO_NICK_FLOODS stuff. If you change your + nick 4 times within 15 seconds, you can't change your nick for 30 seconds. + 2) Commented out the flushing of dns cache when /rehashing. There seems + to be a problem on some OS's where the cache isn't cleared and ircd + coredumps soon after the rehash() function ends. + 3) Changed read_motd() to work on all systems. On AIX the last line + of the motd was being read 2 times. + 4) Fixed a small bug where 'motd' wasn't init'd correctly when the + server would start. + New in CSr22: 1) Fixed REJECT_BOTS stuff. This was broken starting with r20 or so. diff -N -c -r irc2.8.21+CSr22/include/comstud.h irc2.8.21+CSr23/include/comstud.h *** irc2.8.21+CSr22/include/comstud.h Sat Apr 27 21:58:46 1996 --- irc2.8.21+CSr23/include/comstud.h Thu May 30 00:29:11 1996 *************** *** 220,226 **** want them logged */ ! #define FNAME_FAILED_OPER "/home/irc/irc2.8.21+CSr22/lib/logs/failed.log" /* CLIENT_NOTICES - define this if you wish to see client connecting and exiting notices via /umode +c --- 220,226 ---- want them logged */ ! #define FNAME_FAILED_OPER "/home/irc/irc2.8.21+CSr23/lib/logs/failed.log" /* CLIENT_NOTICES - define this if you wish to see client connecting and exiting notices via /umode +c *************** *** 310,316 **** and you wish to log clones */ ! #define FNAME_CLONELOG "/home/irc/irc2.8.21+CSr22/lib/logs/clones.log" /* DEFAULT_IDLELIMIT - if you have CHECK_IDLE defined above, this value is the default # a client --- 310,316 ---- and you wish to log clones */ ! #define FNAME_CLONELOG "/home/irc/irc2.8.21+CSr23/lib/logs/clones.log" /* DEFAULT_IDLELIMIT - if you have CHECK_IDLE defined above, this value is the default # a client diff -N -c -r irc2.8.21+CSr22/include/config.h irc2.8.21+CSr23/include/config.h *** irc2.8.21+CSr22/include/config.h Sat Apr 27 20:45:32 1996 --- irc2.8.21+CSr23/include/config.h Thu May 30 00:29:19 1996 *************** *** 108,115 **** * 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+CSr22/lib" /* dir where all ircd stuff is */ ! #define SPATH "/home/irc/irc2.8.21+CSr22/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 */ --- 108,115 ---- * 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+CSr23/lib" /* dir where all ircd stuff is */ ! #define SPATH "/home/irc/irc2.8.21+CSr23/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 */ *************** *** 123,130 **** * successful use of /oper. These are either full paths or files within DPATH. */ ! #define FNAME_USERLOG "/home/irc/irc2.8.21+CSr22/logs/users.log" /* */ ! #define FNAME_OPERLOG "/home/irc/irc2.8.21+CSr22/logs/opers.log" /* */ /* CHROOTDIR * --- 123,130 ---- * successful use of /oper. These are either full paths or files within DPATH. */ ! #define FNAME_USERLOG "/home/irc/irc2.8.21+CSr23/logs/users.log" /* */ ! #define FNAME_OPERLOG "/home/irc/irc2.8.21+CSr23/logs/opers.log" /* */ /* CHROOTDIR * diff -N -c -r irc2.8.21+CSr22/include/patchlevel.h irc2.8.21+CSr23/include/patchlevel.h *** irc2.8.21+CSr22/include/patchlevel.h Fri Apr 5 20:24:03 1996 --- irc2.8.21+CSr23/include/patchlevel.h Thu May 30 00:29:02 1996 *************** *** 17,21 **** */ #ifndef PATCHLEVEL ! #define PATCHLEVEL "2.8.21+CSr22" #endif --- 17,21 ---- */ #ifndef PATCHLEVEL ! #define PATCHLEVEL "2.8.21+CSr23" #endif diff -N -c -r irc2.8.21+CSr22/ircd/ircd.c irc2.8.21+CSr23/ircd/ircd.c *** irc2.8.21+CSr22/ircd/ircd.c Sat Apr 27 17:39:31 1996 --- irc2.8.21+CSr23/ircd/ircd.c Wed May 29 19:45:15 1996 *************** *** 594,600 **** --- 594,604 ---- time_t nextfdlistcheck=0; /*end of priority code */ #endif NOW = time(NULL); + #ifdef BETTER_MOTD + motd = NULL; + motd_tm = NULL; read_motd(MOTD); + #endif #ifdef DBUF_INIT dbuf_init(); /* set up some dbuf stuff to control paging */ #endif diff -N -c -r irc2.8.21+CSr22/ircd/s_conf.c irc2.8.21+CSr23/ircd/s_conf.c *** irc2.8.21+CSr22/ircd/s_conf.c Sat Apr 27 20:49:39 1996 --- irc2.8.21+CSr23/ircd/s_conf.c Wed May 29 19:32:04 1996 *************** *** 623,630 **** --- 623,633 ---- for (cltmp = NextClass(FirstClass()); cltmp; cltmp = NextClass(cltmp)) MaxLinks(cltmp) = -1; + /* Let's don't do this...somewhere, the cache doesn't get cleared correctly. + At least on some OS's. - Comstud if (sig != 2) flush_cache(); + */ clear_conf_list(&KList1, 1); clear_conf_list(&KList2, 1); diff -N -c -r irc2.8.21+CSr22/ircd/s_serv.c irc2.8.21+CSr23/ircd/s_serv.c *** irc2.8.21+CSr22/ircd/s_serv.c Sat Apr 27 20:50:57 1996 --- irc2.8.21+CSr23/ircd/s_serv.c Wed May 29 19:45:59 1996 *************** *** 2369,2377 **** fstat(fileno(st), &sb); motd_tm = localtime(&sb.st_mtime); last = NULL; ! while(!feof(st)) { - fgets(buffer, 80, st); if ((blah = strchr(buffer, '\n')) != NULL) *blah = (char) 0; if ((blah = strchr(buffer, '\r')) != NULL) --- 2369,2376 ---- fstat(fileno(st), &sb); motd_tm = localtime(&sb.st_mtime); last = NULL; ! while(fgets(buffer, 80, st)) { if ((blah = strchr(buffer, '\n')) != NULL) *blah = (char) 0; if ((blah = strchr(buffer, '\r')) != NULL) *************** *** 2427,2432 **** --- 2426,2432 ---- return 0; } sendto_one(sptr, rpl_str(RPL_MOTDSTART), me.name, parv[0], me.name); + if (tm) sendto_one(sptr, ":%s %d %s :- %d/%d/%d %d:%02d", me.name, RPL_MOTD, parv[0], tm->tm_mday, tm->tm_mon+1, 1900+tm->tm_year, tm->tm_hour, tm->tm_min); diff -N -c -r irc2.8.21+CSr22/ircd/s_user.c irc2.8.21+CSr23/ircd/s_user.c *** irc2.8.21+CSr22/ircd/s_user.c Sat Apr 27 20:41:09 1996 --- irc2.8.21+CSr23/ircd/s_user.c Wed May 29 19:30:10 1996 *************** *** 773,784 **** #ifdef NO_NICK_FLOODS if (MyClient(sptr) && IsRegistered(sptr)) { ! if (!sptr->lastnick || (NOW-sptr->lastnick > 60)) sptr->numnicks = 0; ! sptr->lastnick = NOW; sptr->numnicks++; if (sptr->numnicks > 3) { sendto_flagops(1,"Nick flooding detected by: %s [%s@%s]", sptr->name, sptr->user->username, sptr->user->host); sendto_one(sptr, err_str(ERR_TOOMANYNICKS), --- 773,793 ---- #ifdef NO_NICK_FLOODS if (MyClient(sptr) && IsRegistered(sptr)) { ! /* "lastnick" will actually be the first time a person did a /nick ! if "lastnick" is 0 (has never /nick'd) or if "lastnick" is more ! than 15 seconds ago, then "lastnick" will be reset to NOW ! Basically, when someone hits 4 nick changes in 15 seconds, boom. ! */ ! ! if (!sptr->lastnick || (NOW-sptr->lastnick > 15)) ! { sptr->numnicks = 0; ! sptr->lastnick = NOW; ! } sptr->numnicks++; if (sptr->numnicks > 3) { + sptr->lastnick = NOW+15; /* Hurt the person */ sendto_flagops(1,"Nick flooding detected by: %s [%s@%s]", sptr->name, sptr->user->username, sptr->user->host); sendto_one(sptr, err_str(ERR_TOOMANYNICKS),