diff -c -r irc2.8.21+CSr24/Makefile irc2.8.21+CSr25/Makefile *** irc2.8.21+CSr24/Makefile Wed Jul 24 19:31:56 1996 --- irc2.8.21+CSr25/Makefile Sun Sep 15 13:18:25 1996 *************** *** 17,32 **** #* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. #*/ ! CC=cc RM=/bin/rm - INCLUDEDIR=../include -I/usr/include - #-I/usr/gnu/include # Default flags: ! CFLAGS= -I$(INCLUDEDIR) -g #O2 #IRCDLIBS=-L/usr/lib -L/usr/gnu/lib -lgnuc -O2 ! IRCLIBS=-lcurses -ltermcap # # use the following on MIPS: #CFLAGS= -systype bsd43 -DSYSTYPE_BSD43 -I$(INCLUDEDIR) --- 17,41 ---- #* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. #*/ ! CC=gcc RM=/bin/rm + # # Default flags: ! INCLUDEDIR=../include ! CFLAGS= -I$(INCLUDEDIR) -O2 -fexpensive-optimizations -funroll-loops -fomit-frame-pointer ! IRCDLIBS= ! ! # ! # Solaris 2 flags: ! #IRCDLIBS=-L/usr/lib -lsocket -lnsl -lresolv ! ! # Others: ! #O2 #IRCDLIBS=-L/usr/lib -L/usr/gnu/lib -lgnuc -O2 ! #IRCLIBS=-lcurses -ltermcap ! # # use the following on MIPS: #CFLAGS= -systype bsd43 -DSYSTYPE_BSD43 -I$(INCLUDEDIR) diff -c -r irc2.8.21+CSr24/README.CS irc2.8.21+CSr25/README.CS *** irc2.8.21+CSr24/README.CS Wed Jul 24 20:26:44 1996 --- irc2.8.21+CSr25/README.CS Sun Sep 15 13:01:11 1996 *************** *** 1,14 **** --- ! This is the README for irc2.8.21+CSr24. Basically, this is just a list of changes...more information can be found in include/comstud.h. ! Any questions or comments can be directed to cbehrens@stealth.net --- 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 CSr24: --- 1,62 ---- --- ! This is the README for irc2.8.21+CSr25. Basically, this is just a list of changes...more information can be found in include/comstud.h. ! Any questions or comments can be directed to cbehrens@concentric.net ! The newest versions of +CS ircds can be found at: ! http://www.concentric.net/~Cbehrens/ircd --- 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 CSr25: + + 1) Fixed a bug in a patch that DWildstar gave me in CSr21. + No more spewing of "Would have caused fake directions" for my + uplinks. Yay! + 2) Fixed BETTER_MOTD where the motd would not be present until + you /rehash'd the server...and sometimes when /rehash'ing it + wouldn't reload. + 3) Fixed LIMIT_UH stuff. Actually, it's changed a bit. The limit # + is set via the connection frequency field of the class (Y: line) + For example, I:*.slavery.com::*.slavery.com::1 + And Y:1:180:1:15:1000000 + ^^^ + That will allow only 1 unique u@h from *.slavery.com + This way you can put "2" or so for the class that you use for + open *@* I: lines if you want to allow them 2 connections...etc. + 4) You can now #define USE_POLL on SunOS to use SunOS's poll() + + 5) Created a new usermode +d, and moved "Identd response differs" + messages there + 6) Created a new usermode +b, and moved the Bot/Invalid username + notices to it. + 7) Created a new usermode +l, and moved UH_LIMIT reject notices there + 8) Got rid of the +r usermode, which is in 2.9 servers. + 9) USERHOST and ISON do not "lag" users now, so NOTIFY, won't penalize you. + 10) A couple things dealing with K-lines. K-lines now by default are + put in a separate file. This file is set by KPATH in config.h + #define PUT_KLINES_IN_IRCD_CONF if you don't wish to use a separate + file for klines. Purpose of keeping klines in a separate file is for + easier management of your klines. Another #define for klines is + SEPARATE_QUOTE_KLINES_BY_DATE. This #define will put your quote klines + in a file something like klines.conf-960915 if KPATH is defined to be + "klines.conf". When you /rehash or start ircd, these dated files are + NOT loaded. You will have to manually move them into klines.conf. + The purpose of this is to decide at the end of the day which quote klines + you would like to keep, etc. + 11) #define NO_REDUNDANT_KLINES if you want your /quote kline to reject + any klines that are already in your .conf. This patch came from + teletype. I didn't use his code to remove old redundant ones that + are already in your .conf, but will come up with something in the + future. + 12) Fixed dependancies in the Makefiles for comstud.h, etc. + 13) Fixed NO_NICK_FLOODS so that if a user is trying to switch to a nickname + that already exists, it won't penalize him/her. + New in CSr24: diff -c -r irc2.8.21+CSr24/common/Makefile irc2.8.21+CSr25/common/Makefile *** irc2.8.21+CSr24/common/Makefile Sat Jun 8 13:39:28 1996 --- irc2.8.21+CSr25/common/Makefile Mon Sep 9 11:41:25 1996 *************** *** 17,23 **** #* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. #*/ ! CC=cc RM=/bin/rm INCLUDE=../include --- 17,23 ---- #* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. #*/ ! CC=gcc RM=/bin/rm INCLUDE=../include *************** *** 52,69 **** # DO NOT DELETE THIS LINE -- make depend depends on it. ! bsd.o: bsd.c ../include/common.h ../include/sys.h ../include/config.h dbuf.o: ../include/config.h ../include/common.h ../include/dbuf.h ! dbuf.o: ../include/sys.h dbuf.c ! packet.o: ../include/struct.h ../include/config.h ../include/class.h packet.o: ../include/dbuf.h ../include/common.h ../include/msg.h packet.c ! parse.o: ../include/struct.h ../include/config.h parse.o: ../include/class.h ../include/dbuf.h ../include/common.h parse.o: ../include/msg.h ../include/sys.h parse.o: ../include/numeric.h parse.c send.o: ../include/struct.h ../include/config.h ../include/class.h ! send.o: ../include/dbuf.h ../include/common.h send.c ! match.o: ../include/config.h ../include/common.h ../include/sys.h match.c ! manew.o: ../include/config.h ../include/common.h ../include/sys.h manew.c ! support.o: ../include/config.h ../include/common.h ../include/sys.h support.c ! inet_addr.o: ../include/sys.h inet_addr.c ../include/common.h --- 52,69 ---- # DO NOT DELETE THIS LINE -- make depend depends on it. ! bsd.o: bsd.c ../include/common.h ../include/sys.h ../include/config.h ../include/comstud.h dbuf.o: ../include/config.h ../include/common.h ../include/dbuf.h ! dbuf.o: ../include/comstud.h ../include/sys.h dbuf.c ! packet.o: ../include/comstud.h ../include/struct.h ../include/config.h ../include/class.h packet.o: ../include/dbuf.h ../include/common.h ../include/msg.h packet.c ! parse.o: ../include/comstud.h ../include/struct.h ../include/config.h parse.o: ../include/class.h ../include/dbuf.h ../include/common.h parse.o: ../include/msg.h ../include/sys.h parse.o: ../include/numeric.h parse.c send.o: ../include/struct.h ../include/config.h ../include/class.h ! send.o: ../include/comstud.h ../include/dbuf.h ../include/common.h send.c ! match.o: ../include/comstud.h ../include/config.h ../include/common.h ../include/sys.h match.c ! manew.o: ../include/comstud.h ../include/config.h ../include/common.h ../include/sys.h manew.c ! support.o: ../include/comstud.h ../include/config.h ../include/common.h ../include/sys.h support.c ! inet_addr.o: ../include/comstud.h ../include/sys.h inet_addr.c ../include/common.h diff -c -r irc2.8.21+CSr24/common/parse.c irc2.8.21+CSr25/common/parse.c *** irc2.8.21+CSr24/common/parse.c Sat Jun 8 13:39:28 1996 --- irc2.8.21+CSr25/common/parse.c Mon Sep 9 13:08:11 1996 *************** *** 385,390 **** --- 385,392 ---- i = bufend - ((s) ? s : ch); mptr->bytes += i; if ((mptr->flags & 1) && !(IsServer(cptr) || IsService(cptr))) + { + if (mptr->func != m_ison && mptr->func != m_userhost) cptr->since += (2 + i / 120); /* Allow only 1 msg per 2 seconds * (on average) to prevent dumping. *************** *** 392,397 **** --- 394,400 ---- * bursts of up to 5 msgs are allowed * -SRB */ + } } /* ** Must the following loop really be so devious? On diff -c -r irc2.8.21+CSr24/common/send.c irc2.8.21+CSr25/common/send.c *** irc2.8.21+CSr24/common/send.c Sat Jun 8 13:39:29 1996 --- irc2.8.21+CSr25/common/send.c Mon Sep 9 12:15:40 1996 *************** *** 973,986 **** return; } #endif /* FK_USERMODES */ for (i = 0; i <= highest_fd; i++) if ((cptr = local[i]) && !IsServer(cptr) && !IsMe(cptr) && ! (((flag == 1) && IsAnOper(cptr)) || ! ((flag == 2) && IsAnOper(cptr) && IsCMode(cptr)) || ! ((flag == 3) && IsKMode(cptr)) || ! ((flag == 4) && IsFMode(cptr)) || ! ((flag == 5) && IsRMode(cptr)) || ! ((flag == 6) && IsUMode(cptr)))) { (void)irc_sprintf(nbuf, ":%s NOTICE %s :*** Notice -- ", me.name, cptr->name); --- 973,998 ---- return; } #endif /* FK_USERMODES */ + /* + 1 == Opers + 2 == Opers and +c + 3 == +k + 4 = +f + 5 = +b + 6 = +u + 7 = +d + 8 = +l + */ for (i = 0; i <= highest_fd; i++) if ((cptr = local[i]) && !IsServer(cptr) && !IsMe(cptr) && ! (((flag == OPERS) && IsAnOper(cptr)) || ! ((flag == CMODE) && IsAnOper(cptr) && IsCMode(cptr)) || ! ((flag == KMODE) && IsKMode(cptr)) || ! ((flag == FMODE) && IsFMode(cptr)) || ! ((flag == BMODE) && IsBMode(cptr)) || ! ((flag == UMODE) && IsUMode(cptr)) || ! ((flag == DMODE) && IsDMode(cptr)) || ! ((flag == LMODE) && IsLMode(cptr)))) { (void)irc_sprintf(nbuf, ":%s NOTICE %s :*** Notice -- ", me.name, cptr->name); diff -c -r irc2.8.21+CSr24/include/comstud.h irc2.8.21+CSr25/include/comstud.h *** irc2.8.21+CSr24/include/comstud.h Wed Jul 24 21:46:24 1996 --- irc2.8.21+CSr25/include/comstud.h Sun Sep 15 13:02:01 1996 *************** *** 1,20 **** #ifndef COMSTUD_H #define COMSTUD_H ! /* LIMIT_UH - If you want to limit clients to 1 u@h on your server, ! define this to 1. You can also define this to 0 ! which disables the check...but it will compile the ! code into the server, and then you can /quote limituh # ! while opered. ! If you never want to use this, #undef it. ! Examples: ! ! #define LIMIT_UH 1 - Starts out limiting 1 client per user@host ! #define LIMIT_UH 0 - Starts out with no checking, but you can /quote ! #undef LIMIT_UH - Doesn't compile in the code.../quote won't work. */ ! #define LIMIT_UH 0 /* BUFFERED_LOGS - define this to reduce disk IO when writing users.log --- 1,57 ---- #ifndef COMSTUD_H #define COMSTUD_H ! /* NO_REDUNDANT_KLINES ! - This will check the kline that you try and put in ! via /quote kline and will not allow it if it matches ! a kline that's already in memory. */ ! #define NO_REDUNDANT_KLINES ! ! /* PUT_KLINES_IN_IRCD_CONF ! - Starting in CSr25, klines can now be stored in a file ! separated from ircd.conf. The file name is chosen ! via KPATH in config.h. If QUOTE_KLINE is defined, ! by default, when you /quote kline, it'll put these ! new K: lines in the kline.conf file instead of ircd.conf ! This can be used as a way to separate the millions ! of K: lines that you may have. ! ! *** If you do not like the idea of separate files, define this *** ! #define PUT_KLINES_IN_IRCD_CONF ! */ ! ! /* SEPARATE_QUOTE_KLINES_BY_DATE ! - If PUT_KLINES_IN_IRCD_CONF is #undefined, you may ! #define this to put /quote klines into separate files ! by date. Ie, if KPATH is "kline.conf", and today is ! 09/09/96, it'll put today's quote klines in: ! kline.conf.960909 ! Note: These files with dates will NOT be loaded when ! you start ircd...and if you /rehash all the quote klines ! for the day are lost, until you manually move the ones ! from kline.conf.960909 into kline.conf ! ! Purpose: Sometimes you may not want your quote klines to last ! more than a day, or you may want to look thru the ! kline.conf.960909 file before you move them into ! kline.conf. ! */ ! ! #define SEPARATE_QUOTE_KLINES_BY_DATE ! ! /* LIMIT_UH - Use this if you want to use the connect frequency ! field in the Y: lines to limit that class to a ! certain # of same u@h's. ! For example, you can limit class 1 so that only 1 ! connection per u@h is allowed (by setting the confreq ! field to 1) This should cut down on clones and multiple ! clients. ! ! */ ! ! #define LIMIT_UH /* BUFFERED_LOGS - define this to reduce disk IO when writing users.log *************** *** 152,158 **** /mode * +o nick */ ! #define NO_RED_MODES /* IP_BAN_ALL - define this if you want a really cool ban system --- 189,195 ---- /mode * +o nick */ ! #undef NO_RED_MODES /* IP_BAN_ALL - define this if you want a really cool ban system *************** *** 175,187 **** like: FuckYou which don't have all one case */ ! #define NO_MIXED_CASE /* IGNORE_FIRST_CHAR - define this for NO_MIXED_CASE if you wish to ignore the first character */ ! #define IGNORE_FIRST_CHAR /* NO_SPECIAL - define this if you want no "special" characters in usernames. A character is "special" if --- 212,224 ---- like: FuckYou which don't have all one case */ ! #undef NO_MIXED_CASE /* IGNORE_FIRST_CHAR - define this for NO_MIXED_CASE if you wish to ignore the first character */ ! #undef IGNORE_FIRST_CHAR /* NO_SPECIAL - define this if you want no "special" characters in usernames. A character is "special" if *************** *** 194,200 **** /* REJECT_IPHONE - define if you want to reject I-phoners */ ! #define REJECT_IPHONE /* REJECT_BOTS - Performs minimal checking to see if a client which is trying to connect is a bot... --- 231,237 ---- /* REJECT_IPHONE - define if you want to reject I-phoners */ ! #undef REJECT_IPHONE /* REJECT_BOTS - Performs minimal checking to see if a client which is trying to connect is a bot... *************** *** 235,241 **** want them logged */ ! #define FNAME_FAILED_OPER "/home/irc/irc2.8.21+CSr24/lib/logs/failed.log" /* CLIENT_NOTICES - define this if you wish to see client connecting and exiting notices via /umode +c --- 272,278 ---- want them logged */ ! #define FNAME_FAILED_OPER "/home/irc/irc2.8.21+CSr25/lib/logs/failed.log" /* CLIENT_NOTICES - define this if you wish to see client connecting and exiting notices via /umode +c *************** *** 325,331 **** and you wish to log clones */ ! #define FNAME_CLONELOG "/home/irc/irc2.8.21+CSr24/lib/logs/clones.log" /* DEFAULT_IDLELIMIT - if you have CHECK_IDLE defined above, this value is the default # a client --- 362,368 ---- and you wish to log clones */ ! #define FNAME_CLONELOG "/home/irc/irc2.8.21+CSr25/logs/clones.log" /* DEFAULT_IDLELIMIT - if you have CHECK_IDLE defined above, this value is the default # a client diff -c -r irc2.8.21+CSr24/include/config.h irc2.8.21+CSr25/include/config.h *** irc2.8.21+CSr24/include/config.h Wed Jul 24 19:32:06 1996 --- irc2.8.21+CSr25/include/config.h Sun Sep 15 13:19:36 1996 *************** *** 30,36 **** #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 */ --- 30,35 ---- *************** *** 42,48 **** /* SGI Nothing needed (IRIX 4.0.4) */ #undef SVR3 /* SVR3 stuff - being worked on where poss. */ #undef DYNIXPTX /* Sequents Brain-dead Posix implement. */ ! #undef SOL20 /* Solaris2 */ #undef ESIX /* ESIX */ #undef NEXT /* NeXTStep */ #undef SVR4 --- 41,47 ---- /* SGI Nothing needed (IRIX 4.0.4) */ #undef SVR3 /* SVR3 stuff - being worked on where poss. */ #undef DYNIXPTX /* Sequents Brain-dead Posix implement. */ ! #undef SOL20 /* Solaris2 */ #undef ESIX /* ESIX */ #undef NEXT /* NeXTStep */ #undef SVR4 *************** *** 56,62 **** #ifdef SOL20 ! #define USE_POLL /* Define this if you want to use poll() on lame Solaris */ #endif --- 55,64 ---- #ifdef SOL20 ! /* POLL seems to be broken/using 99% CPU, so this is disabled until ! I can take a look at it */ ! ! #undef USE_POLL /* Define this if you want to use poll() on lame Solaris */ #endif *************** *** 116,124 **** * 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+CSr24/lib" /* dir where all ircd stuff is */ ! #define SPATH "/home/irc/irc2.8.21+CSr24/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 */ #define PPATH "ircd.pid" /* file for server pid */ --- 118,127 ---- * 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+CSr25/lib" /* dir where all ircd stuff is */ ! #define SPATH "/home/irc/irc2.8.21+CSr25/lib/ircd" #define CPATH "ircd.conf" /* server configuration file */ + #define KPATH "klines/klines.conf" /* config file containing K: lines */ #define MPATH "ircd.motd" /* server MOTD file */ #define LPATH "ircd.log" /* Where the debug file lives, if DEBUGMODE */ #define PPATH "ircd.pid" /* file for server pid */ *************** *** 131,138 **** * successful use of /oper. These are either full paths or files within DPATH. */ ! #define FNAME_USERLOG "/home/irc/irc2.8.21+CSr24/logs/users.log" /* */ ! #define FNAME_OPERLOG "/home/irc/irc2.8.21+CSr24/logs/opers.log" /* */ /* CHROOTDIR * --- 134,141 ---- * successful use of /oper. These are either full paths or files within DPATH. */ ! #define FNAME_USERLOG "users.log" ! #define FNAME_OPERLOG "opers.log" /* CHROOTDIR * *************** *** 189,195 **** #define OPER_KILL #define OPER_REHASH #undef OPER_RESTART ! #undef OPER_DIE #define OPER_REMOTE #undef LOCOP_REHASH #undef LOCOP_RESTART --- 192,198 ---- #define OPER_KILL #define OPER_REHASH #undef OPER_RESTART ! #define OPER_DIE #define OPER_REMOTE #undef LOCOP_REHASH #undef LOCOP_RESTART *************** *** 333,345 **** /* * Max amount of internal send buffering when socket is stuck (bytes) */ ! #define MAXSENDQLENGTH 3000000 /* Recommended value: 100000 for leaves */ /* 700000 for backbones */ /* * BUFFERPOOL is the maximum size of the total of all sendq's. * Recommended value is 2 * MAXSENDQLENGTH, for hubs, 5 *. */ ! #define BUFFERPOOL (5 * MAXSENDQLENGTH) /* * use these to setup a Unix domain socket to connect clients/servers to. --- 336,348 ---- /* * Max amount of internal send buffering when socket is stuck (bytes) */ ! #define MAXSENDQLENGTH 4000000 /* Recommended value: 100000 for leaves */ /* 700000 for backbones */ /* * BUFFERPOOL is the maximum size of the total of all sendq's. * Recommended value is 2 * MAXSENDQLENGTH, for hubs, 5 *. */ ! #define BUFFERPOOL (10 * MAXSENDQLENGTH) /* * use these to setup a Unix domain socket to connect clients/servers to. *************** *** 413,419 **** * 1 server = 1 connection, 1 user = 1 connection. * This should be at *least* 3: 1 listen port, 1 dns port + 1 client */ ! #define MAXCONNECTIONS 255 /* * this defines the length of the nickname history. each time a user changes --- 416,422 ---- * 1 server = 1 connection, 1 user = 1 connection. * This should be at *least* 3: 1 listen port, 1 dns port + 1 client */ ! #define MAXCONNECTIONS 1024 /* * this defines the length of the nickname history. each time a user changes *************** *** 501,506 **** --- 504,510 ---- #define MYNAME SPATH #define CONFIGFILE CPATH #define IRCD_PIDFILE PPATH + #define KLINEFILE KPATH #ifdef __osf__ #define OSF Only in irc2.8.21+CSr25/include: config.h.r25 Only in irc2.8.21+CSr25/include: config.h.save diff -c -r irc2.8.21+CSr24/include/h.h irc2.8.21+CSr25/include/h.h *** irc2.8.21+CSr24/include/h.h Wed Jul 24 19:31:34 1996 --- irc2.8.21+CSr25/include/h.h Sun Sep 15 12:53:20 1996 *************** *** 25,34 **** */ #include "comstud.h" ! ! #ifdef LIMIT_UH ! extern int uhlimit; ! #endif #ifdef HIGHEST_CONNECTION extern void check_max_count(); --- 25,31 ---- */ #include "comstud.h" ! #include "dich_conf.h" #ifdef HIGHEST_CONNECTION extern void check_max_count(); *************** *** 40,45 **** --- 37,46 ---- extern struct tm *motd_tm; #endif + #ifdef NO_REDUNDANT_KLINES + extern int test_kline_userhost PROTO((aClient *, aConfList *, char *, char *)); + #endif + extern int idlelimit; extern int s_count, c_count, ch_count, u_count, i_count; extern int o_count, m_clients, m_servers, m_invis; *************** *** 128,140 **** extern aConfItem *find_conf_host PROTO((Link *, char *, int)); extern aConfItem *find_conf_ip PROTO((Link *, char *, char *, int)); extern aConfItem *find_conf_name PROTO((char *, int)); ! extern int find_kill PROTO((aClient *)); extern int find_restrict PROTO((aClient *)); extern int rehash PROTO((aClient *, aClient *, int)); ! extern int initconf PROTO((int)); extern char *MyMalloc PROTO((int)), *MyRealloc PROTO((char *, int)); ! extern char *debugmode, *configfile, *sbrk0; extern char *getfield PROTO((char *)); extern void get_sockhost PROTO((aClient *, char *)); extern char *rpl_str PROTO((int)), *err_str PROTO((int)); --- 129,141 ---- extern aConfItem *find_conf_host PROTO((Link *, char *, int)); extern aConfItem *find_conf_ip PROTO((Link *, char *, char *, int)); extern aConfItem *find_conf_name PROTO((char *, int)); ! extern int find_kill PROTO((aClient *, int)); extern int find_restrict PROTO((aClient *)); extern int rehash PROTO((aClient *, aClient *, int)); ! extern int initconf PROTO((int, char *)); extern char *MyMalloc PROTO((int)), *MyRealloc PROTO((char *, int)); ! extern char *debugmode, *configfile, *klinefile, *sbrk0; extern char *getfield PROTO((char *)); extern void get_sockhost PROTO((aClient *, char *)); extern char *rpl_str PROTO((int)), *err_str PROTO((int)); diff -c -r irc2.8.21+CSr24/include/msg.h irc2.8.21+CSr25/include/msg.h *** irc2.8.21+CSr24/include/msg.h Wed Jul 24 19:34:14 1996 --- irc2.8.21+CSr25/include/msg.h Fri Aug 30 15:57:36 1996 *************** *** 90,98 **** #ifdef IDLE_CHECK #define MSG_IDLE "IDLE" /* IDLE */ #endif - #ifdef LIMIT_UH - #define MSG_LIMITUH "LIMITUH" /* LIMITUH */ - #endif #define MAXPARA 15 #ifdef DOG3 --- 90,95 ---- *************** *** 105,113 **** #ifdef IDLE_CHECK extern int m_idle(); #endif - #ifdef LIMIT_UH - extern int m_limituh(); - #endif extern int m_private(), m_topic(), m_join(), m_part(), m_mode(); extern int m_ping(), m_pong(), m_wallops(), m_kick(); extern int m_nick(), m_error(), m_notice(); --- 102,107 ---- *************** *** 197,205 **** #endif #ifdef IDLE_CHECK { MSG_IDLE, m_idle, 0, MAXPARA, 1 ,0L }, - #endif - #ifdef LIMIT_UH - { MSG_LIMITUH, m_limituh, 0, MAXPARA, 1 ,0L }, #endif #if defined(NPATH) && !defined(CLIENT_COMPILE) { MSG_NOTE, m_note, 0, 1, 1 ,0L }, --- 191,196 ---- diff -c -r irc2.8.21+CSr24/include/patchlevel.h irc2.8.21+CSr25/include/patchlevel.h *** irc2.8.21+CSr24/include/patchlevel.h Wed Jul 24 20:29:51 1996 --- irc2.8.21+CSr25/include/patchlevel.h Mon Sep 9 14:08:01 1996 *************** *** 17,21 **** */ #ifndef PATCHLEVEL ! #define PATCHLEVEL "2.8.21+CSr24" #endif --- 17,21 ---- */ #ifndef PATCHLEVEL ! #define PATCHLEVEL "2.8.21+CSr25" #endif diff -c -r irc2.8.21+CSr24/include/setup.h irc2.8.21+CSr25/include/setup.h *** irc2.8.21+CSr24/include/setup.h Wed Jul 24 19:32:06 1996 --- irc2.8.21+CSr25/include/setup.h Sun Sep 15 13:17:25 1996 *************** *** 5,11 **** #define STRINGH #define STRINGSH #define STDLIBH ! #undef STDDEFH #define SYSSYSLOGH #undef NOINDEX #undef NEED_STRERROR --- 5,11 ---- #define STRINGH #define STRINGSH #define STDLIBH ! #define STDDEFH #define SYSSYSLOGH #undef NOINDEX #undef NEED_STRERROR diff -c -r irc2.8.21+CSr24/include/setup.h.bak irc2.8.21+CSr25/include/setup.h.bak *** irc2.8.21+CSr24/include/setup.h.bak Wed Jul 24 18:21:48 1996 --- irc2.8.21+CSr25/include/setup.h.bak Mon Sep 9 17:38:20 1996 *************** *** 7,24 **** #define STDLIBH #define STDDEFH #define SYSSYSLOGH ! #undef NOINDEX ! #undef NEED_STRERROR #define NEED_STRTOKEN #undef NEED_STRTOK ! #define NEED_INET_ADDR #undef NEED_INET_NTOA #undef NEED_INET_NETOF ! #define GETTIMEOFDAY #undef LRAND48 #define MALLOCH ! #define NBLOCK_BSD ! #define BSD_RELIABLE_SIGNALS #undef TIMES_2 ! #define GETRUSAGE_2 #endif --- 7,27 ---- #define STDLIBH #define STDDEFH #define SYSSYSLOGH ! #define NOINDEX ! #define NEED_STRERROR #define NEED_STRTOKEN #undef NEED_STRTOK ! #undef NEED_INET_ADDR #undef NEED_INET_NTOA #undef NEED_INET_NETOF ! #undef GETTIMEOFDAY #undef LRAND48 #define MALLOCH ! #undef bzero(a,b) memset(a,0,b) ! #undef bcopy(a,b,c) memcpy(b,a,c) ! #define bcmp memcmp ! #define NBLOCK_POSIX ! #define POSIX_SIGNALS #undef TIMES_2 ! #undef GETRUSAGE_2 #endif Only in irc2.8.21+CSr25/include: setup.h.save Only in irc2.8.21+CSr25/include: setup.h.sol diff -c -r irc2.8.21+CSr24/include/struct.h irc2.8.21+CSr25/include/struct.h *** irc2.8.21+CSr24/include/struct.h Sat Jun 8 13:39:27 1996 --- irc2.8.21+CSr25/include/struct.h Mon Sep 9 12:15:23 1996 *************** *** 62,67 **** --- 62,79 ---- #include "dbuf.h" /* THIS REALLY SHOULDN'T BE HERE!!! --msa */ #endif + /* These set of defines are for sendto_flagops */ + #define OPERS 1 + #define CMODE 2 + #define KMODE 3 + #define FMODE 4 + #define BMODE 5 + #define UMODE 6 + #define DMODE 7 + #define LMODE 8 + /* */ + + #define HOSTLEN 63 /* Length of hostname. Updated to */ /* comply with RFC1123 */ *************** *** 175,184 **** #define FLAGS_CMODE 0x200000 /* +c usermode */ #define FLAGS_KMODE 0x400000 /* +k usermode */ #define FLAGS_UMODE 0x800000 /* +u usermode */ ! #define FLAGS_RMODE 0x1000000 /* +r usermode */ #define SEND_UMODES (FLAGS_INVISIBLE|FLAGS_OPER|FLAGS_WALLOP) ! #define ALL_UMODES (SEND_UMODES|FLAGS_SERVNOTICE|FLAGS_CMODE|FLAGS_KMODE|FLAGS_FMODE|FLAGS_UMODE|FLAGS_RMODE) #define FLAGS_ID (FLAGS_DOID|FLAGS_GOTID) /* --- 187,198 ---- #define FLAGS_CMODE 0x200000 /* +c usermode */ #define FLAGS_KMODE 0x400000 /* +k usermode */ #define FLAGS_UMODE 0x800000 /* +u usermode */ ! #define FLAGS_BMODE 0x1000000 /* +b usermode */ ! #define FLAGS_DMODE 0x2000000 /* +d usermode */ ! #define FLAGS_LMODE 0x4000000 /* +l usermode */ #define SEND_UMODES (FLAGS_INVISIBLE|FLAGS_OPER|FLAGS_WALLOP) ! #define ALL_UMODES (SEND_UMODES|FLAGS_SERVNOTICE|FLAGS_CMODE|FLAGS_KMODE|FLAGS_FMODE|FLAGS_UMODE|FLAGS_LMODE|FLAGS_DMODE|FLAGS_BMODE) #define FLAGS_ID (FLAGS_DOID|FLAGS_GOTID) /* *************** *** 192,198 **** #define IsCMode(x) ((x)->flags & FLAGS_CMODE) #define IsUMode(x) ((x)->flags & FLAGS_UMODE) #define IsKMode(x) ((x)->flags & FLAGS_KMODE) ! #define IsRMode(x) ((x)->flags & FLAGS_RMODE) #define IsPerson(x) ((x)->user && IsClient(x)) #define IsPrivileged(x) (IsAnOper(x) || IsServer(x)) #define SendWallops(x) ((x)->flags & FLAGS_WALLOP) --- 206,214 ---- #define IsCMode(x) ((x)->flags & FLAGS_CMODE) #define IsUMode(x) ((x)->flags & FLAGS_UMODE) #define IsKMode(x) ((x)->flags & FLAGS_KMODE) ! #define IsLMode(x) ((x)->flags & FLAGS_LMODE) ! #define IsBMode(x) ((x)->flags & FLAGS_BMODE) ! #define IsDMode(x) ((x)->flags & FLAGS_DMODE) #define IsPerson(x) ((x)->user && IsClient(x)) #define IsPrivileged(x) (IsAnOper(x) || IsServer(x)) #define SendWallops(x) ((x)->flags & FLAGS_WALLOP) diff -c -r irc2.8.21+CSr24/ircd/Makefile irc2.8.21+CSr25/ircd/Makefile *** irc2.8.21+CSr24/ircd/Makefile Sat Jun 8 13:39:29 1996 --- irc2.8.21+CSr25/ircd/Makefile Mon Sep 9 11:50:52 1996 *************** *** 17,23 **** #* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. #*/ ! CC=cc RM=/bin/rm CP=/bin/cp TOUCH=touch --- 17,23 ---- #* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. #*/ ! CC=gcc RM=/bin/rm CP=/bin/cp TOUCH=touch *************** *** 115,139 **** lint $(LINTFLAGS) -I../include $(SRC) | egrep -v 'sendto_|debug' ../common/parse.o: ../common/parse.c ../include/msg.h ../include/config.h\ ! ../include/struct.h ../include/sys.h ../include/numeric.h (cd ../common; $(MAKE) build); ../common/bsd.o: ../common/bsd.c ../include/config.h ../include/common.h\ ! ../include/struct.h ../include/sys.h (cd ../common; $(MAKE) build); ../common/dbuf.o: ../common/dbuf.c ../include/config.h ../include/common.h\ ! ../include/struct.h ../include/dbuf.h (cd ../common; $(MAKE) build); ../common/packet.o: ../common/packet.c ../include/config.h ../include/common.h\ ! ../include/struct.h ../include/msg.h (cd ../common; $(MAKE) build); ../common/send.o: ../common/send.c ../include/config.h ../include/common.h\ ! ../include/struct.h ../include/sys.h (cd ../common; $(MAKE) build); ../common/match.o: ../common/match.c ../include/config.h ../include/common.h\ ! ../include/sys.h (cd ../common; $(MAKE) build); ../common/support.o: ../common/support.c ../include/config.h ../include/sys.h\ ! ../include/common.h (cd ../common; $(MAKE) build); install: all --- 115,140 ---- lint $(LINTFLAGS) -I../include $(SRC) | egrep -v 'sendto_|debug' ../common/parse.o: ../common/parse.c ../include/msg.h ../include/config.h\ ! ../include/struct.h ../include/sys.h ../include/numeric.h\ ! ../include/comstud.h (cd ../common; $(MAKE) build); ../common/bsd.o: ../common/bsd.c ../include/config.h ../include/common.h\ ! ../include/struct.h ../include/sys.h ../include/comstud.h (cd ../common; $(MAKE) build); ../common/dbuf.o: ../common/dbuf.c ../include/config.h ../include/common.h\ ! ../include/struct.h ../include/dbuf.h ../include/comstud.h (cd ../common; $(MAKE) build); ../common/packet.o: ../common/packet.c ../include/config.h ../include/common.h\ ! ../include/struct.h ../include/msg.h ../include/comstud.h (cd ../common; $(MAKE) build); ../common/send.o: ../common/send.c ../include/config.h ../include/common.h\ ! ../include/struct.h ../include/sys.h ../include/comstud.h (cd ../common; $(MAKE) build); ../common/match.o: ../common/match.c ../include/config.h ../include/common.h\ ! ../include/sys.h ../include/comstud.h (cd ../common; $(MAKE) build); ../common/support.o: ../common/support.c ../include/config.h ../include/sys.h\ ! ../include/common.h ../include/comstud.h (cd ../common; $(MAKE) build); install: all *************** *** 157,187 **** channel.o: ../include/struct.h ../include/config.h ../include/dbuf.h \ ../include/numeric.h ../include/channel.h ../include/sys.h \ ! ../include/common.h $(CC) $(CFLAGS) -c channel.c class.o: ../include/struct.h ../include/class.h ../include/numeric.h \ ! ../include/common.h ../include/config.h ../include/sys.h $(CC) $(CFLAGS) -c class.c ircd.o: ircd.c ../include/struct.h ../include/config.h ../include/sys.h \ ! ../include/dbuf.h ../include/numeric.h ../include/common.h $(CC) $(CFLAGS) -c ircd.c list.o: list.c ../include/struct.h ../include/config.h ../include/dbuf.h \ ! ../include/sys.h ../include/common.h $(CC) $(CFLAGS) -c list.c res.o: res.c ../include/struct.h ../include/config.h ../include/res.h \ ! ../include/sys.h ../include/common.h $(CC) $(CFLAGS) -c res.c s_bsd.o: s_bsd.c ../include/struct.h ../include/config.h ../include/dbuf.h \ ! ../include/sys.h ../include/common.h $(CC) $(CFLAGS) -c s_bsd.c s_auth.o: s_auth.c ../include/struct.h ../include/config.h ../include/dbuf.h \ ! ../include/sys.h ../include/common.h $(CC) $(CFLAGS) -c s_auth.c s_conf.o: s_conf.c ../include/struct.h ../include/config.h ../include/sys.h \ --- 158,190 ---- channel.o: ../include/struct.h ../include/config.h ../include/dbuf.h \ ../include/numeric.h ../include/channel.h ../include/sys.h \ ! ../include/common.h ../include/comstud.h $(CC) $(CFLAGS) -c channel.c class.o: ../include/struct.h ../include/class.h ../include/numeric.h \ ! ../include/common.h ../include/config.h ../include/sys.h \ ! ../include/comstud.h $(CC) $(CFLAGS) -c class.c ircd.o: ircd.c ../include/struct.h ../include/config.h ../include/sys.h \ ! ../include/dbuf.h ../include/numeric.h ../include/common.h \ ! ../include/comstud.h $(CC) $(CFLAGS) -c ircd.c list.o: list.c ../include/struct.h ../include/config.h ../include/dbuf.h \ ! ../include/sys.h ../include/common.h ../include/comstud.h $(CC) $(CFLAGS) -c list.c res.o: res.c ../include/struct.h ../include/config.h ../include/res.h \ ! ../include/sys.h ../include/common.h ../include/comstud.h $(CC) $(CFLAGS) -c res.c s_bsd.o: s_bsd.c ../include/struct.h ../include/config.h ../include/dbuf.h \ ! ../include/sys.h ../include/common.h ../include/comstud.h $(CC) $(CFLAGS) -c s_bsd.c s_auth.o: s_auth.c ../include/struct.h ../include/config.h ../include/dbuf.h \ ! ../include/sys.h ../include/common.h ../include/comstud.h $(CC) $(CFLAGS) -c s_auth.c s_conf.o: s_conf.c ../include/struct.h ../include/config.h ../include/sys.h \ *************** *** 190,228 **** $(CC) $(CFLAGS) -c s_conf.c s_debug.o: ../include/config.h ../include/struct.h ../include/common.h \ ! ../include/sys.h s_debug.c $(CC) $(CFLAGS) -c s_debug.c s_err.o: ../include/config.h ../include/struct.h ../include/common.h \ ! ../include/sys.h ../include/numeric.h ../include/msg.h s_err.c $(CC) $(CFLAGS) -c s_err.c s_misc.o: s_misc.c ../include/struct.h ../include/config.h ../include/dbuf.h \ ! ../include/common.h ../include/sys.h ../include/numeric.h $(CC) $(CFLAGS) -c s_misc.c s_user.o: s_user.c ../include/struct.h ../include/config.h ../include/sys.h \ ../include/common.h ../include/dbuf.h ../include/channel.h \ ! ../include/msg.h ../include/numeric.h ../include/whowas.h $(CC) $(CFLAGS) -c s_user.c s_serv.o: s_serv.c ../include/struct.h ../include/config.h ../include/sys.h \ ../include/common.h ../include/dbuf.h ../include/channel.h \ ! ../include/msg.h ../include/numeric.h ../include/whowas.h $(CC) $(CFLAGS) -c s_serv.c s_numeric.o: s_numeric.c ../include/config.h ../include/sys.h \ ../include/common.h ../include/struct.h ../include/dbuf.h \ ! ../include/numeric.h $(CC) $(CFLAGS) -c s_numeric.c whowas.o: ../include/struct.h ../include/config.h ../include/sys.h \ ../include/common.h ../include/dbuf.h ../include/numeric.h \ ! ../include/whowas.h whowas.c $(CC) $(CFLAGS) -c whowas.c hash.o: ../include/struct.h ../include/sys.h ../include/hash.h hash.c \ ! ../include/common.h ../include/config.h s_bsd.c s_serv.c s_user.c \ channel.c s_misc.c @crypt/sums $(CC) $(CFLAGS) -c hash.c --- 193,236 ---- $(CC) $(CFLAGS) -c s_conf.c s_debug.o: ../include/config.h ../include/struct.h ../include/common.h \ ! ../include/sys.h ../include/comstud.h s_debug.c $(CC) $(CFLAGS) -c s_debug.c s_err.o: ../include/config.h ../include/struct.h ../include/common.h \ ! ../include/sys.h ../include/numeric.h ../include/msg.h \ ! ../include/comstud.h s_err.c $(CC) $(CFLAGS) -c s_err.c s_misc.o: s_misc.c ../include/struct.h ../include/config.h ../include/dbuf.h \ ! ../include/common.h ../include/sys.h ../include/numeric.h \ ! ../include/comstud.h $(CC) $(CFLAGS) -c s_misc.c s_user.o: s_user.c ../include/struct.h ../include/config.h ../include/sys.h \ ../include/common.h ../include/dbuf.h ../include/channel.h \ ! ../include/msg.h ../include/numeric.h ../include/whowas.h \ ! ../include/comstud.h $(CC) $(CFLAGS) -c s_user.c s_serv.o: s_serv.c ../include/struct.h ../include/config.h ../include/sys.h \ ../include/common.h ../include/dbuf.h ../include/channel.h \ ! ../include/msg.h ../include/numeric.h ../include/whowas.h \ ! ../include/comstud.h $(CC) $(CFLAGS) -c s_serv.c s_numeric.o: s_numeric.c ../include/config.h ../include/sys.h \ ../include/common.h ../include/struct.h ../include/dbuf.h \ ! ../include/numeric.h ../include/comstud.h $(CC) $(CFLAGS) -c s_numeric.c whowas.o: ../include/struct.h ../include/config.h ../include/sys.h \ ../include/common.h ../include/dbuf.h ../include/numeric.h \ ! ../include/whowas.h ../include/comstud.h whowas.c $(CC) $(CFLAGS) -c whowas.c hash.o: ../include/struct.h ../include/sys.h ../include/hash.h hash.c \ ! ../include/common.h ../include/config.h ../include/comstud.h \ ! s_bsd.c s_serv.c s_user.c \ channel.c s_misc.c @crypt/sums $(CC) $(CFLAGS) -c hash.c *************** *** 231,273 **** @touch hash.o dich_conf.o: ../include/dich_conf.h ../include/struct.h ../include/common.h \ ! dich_conf.c $(CC) $(CFLAGS) -c dich_conf.c # DO NOT DELETE THIS LINE -- make depend depends on it. ! channel.o: ../include/struct.h ../include/config.h ../include/dbuf.h channel.o: ../include/numeric.h ../include/channel.h channel.c ! s_misc.o: ../include/struct.h ../include/config.h ../include/dbuf.h s_misc.c ! ircd.o: ../include/struct.h ../include/config.h ircd.o: ../include/dbuf.h ../include/numeric.h ircd.c list.o: ../include/struct.h ../include/config.h ../include/dbuf.h ! list.o: ../include/sys.h list.c ! res.o: ../include/struct.h ../include/config.h ../include/res.h res.c s_bsd.o: ../include/struct.h ../include/config.h ../include/dbuf.h ! s_bsd.o: ../include/sys.h s_bsd.c s_auth.o: ../include/struct.h ../include/config.h ../include/dbuf.h ! s_auth.o: ../include/sys.h s_auth.c s_debug.o: ../include/config.h ../include/struct.h ../include/common.h ! s_debug.o: ../include/sys.h s_debug.c s_debug.o: ../include/struct.h ../include/common.h ../include/sys.h s_err.o: ../include/struct.h ../include/config.h ../include/numeric.h ! s_err.o: ../include/dbuf.h ../include/sys.h s_err.c s_conf.o: ../include/struct.h ../include/config.h ../include/numeric.h ! s_conf.o: ../include/dbuf.h ../include/sys.h s_conf.c ! s_user.o: ../include/struct.h ../include/config.h s_user.o: ../include/dbuf.h ../include/sys.h ../include/channel.h s_user.o: ../include/msg.h ../include/numeric.h ../include/whowas.h s_user.c ! s_serv.o: ../include/struct.h ../include/config.h s_serv.o: ../include/dbuf.h ../include/sys.h ../include/channel.h s_serv.o: ../include/msg.h ../include/numeric.h ../include/whowas.h s_serv.c s_numeric.o: ../include/config.h ../include/sys.h ../include/struct.h ! s_numeric.o: ../include/dbuf.h ../include/numeric.h s_numeric.c ! whowas.o: ../include/struct.h ../include/config.h ../include/dbuf.h ! whowas.o: ../include/numeric.h ../include/whowas.h ../include/sys.h whowas.c class.o: ../include/struct.h ../include/class.h ../include/numeric.h ! class.o: ../include/common.h ../include/config.h class.c hash.o: ../include/config.h ../include/sys.h ../include/hash.h ! hash.o: ../include/struct.h ../include/common.h s_serv.c s_user.c hash.o: channel.c s_misc.c s_bsd.c ircd.c hash.c version.c.SH version.o: version.c.SH version.c --- 239,281 ---- @touch hash.o dich_conf.o: ../include/dich_conf.h ../include/struct.h ../include/common.h \ ! ../include/comstud.h dich_conf.c $(CC) $(CFLAGS) -c dich_conf.c # DO NOT DELETE THIS LINE -- make depend depends on it. ! channel.o: ../include/struct.h ../include/config.h ../include/dbuf.h ../include/comstud.h channel.o: ../include/numeric.h ../include/channel.h channel.c ! s_misc.o: ../include/struct.h ../include/config.h ../include/comstud.h ../include/dbuf.h s_misc.c ! ircd.o: ../include/struct.h ../include/config.h ../include/comstud.h ircd.o: ../include/dbuf.h ../include/numeric.h ircd.c list.o: ../include/struct.h ../include/config.h ../include/dbuf.h ! list.o: ../include/sys.h ../include/comstud.h list.c ! res.o: ../include/comstud.h ../include/struct.h ../include/config.h ../include/res.h res.c s_bsd.o: ../include/struct.h ../include/config.h ../include/dbuf.h ! s_bsd.o: ../include/comstud.h ../include/sys.h s_bsd.c s_auth.o: ../include/struct.h ../include/config.h ../include/dbuf.h ! s_auth.o: ../include/comstud.h ../include/sys.h s_auth.c s_debug.o: ../include/config.h ../include/struct.h ../include/common.h ! s_debug.o: ../include/comstud.h ../include/sys.h s_debug.c s_debug.o: ../include/struct.h ../include/common.h ../include/sys.h s_err.o: ../include/struct.h ../include/config.h ../include/numeric.h ! s_err.o: ../include/comstud.h ../include/dbuf.h ../include/sys.h s_err.c s_conf.o: ../include/struct.h ../include/config.h ../include/numeric.h ! s_conf.o: ../include/comstud.h ../include/dbuf.h ../include/sys.h s_conf.c ! s_user.o: ../include/comstud.h ../include/struct.h ../include/config.h s_user.o: ../include/dbuf.h ../include/sys.h ../include/channel.h s_user.o: ../include/msg.h ../include/numeric.h ../include/whowas.h s_user.c ! s_serv.o: ../include/comstud.h ../include/struct.h ../include/config.h s_serv.o: ../include/dbuf.h ../include/sys.h ../include/channel.h s_serv.o: ../include/msg.h ../include/numeric.h ../include/whowas.h s_serv.c s_numeric.o: ../include/config.h ../include/sys.h ../include/struct.h ! s_numeric.o: ../include/comstud.h ../include/dbuf.h ../include/numeric.h s_numeric.c ! whowas.o: ../include/comstud.h ../include/struct.h ../include/config.h ../include/dbuf.h ! whowas.o: ../include/comstud.h ../include/numeric.h ../include/whowas.h ../include/sys.h whowas.c class.o: ../include/struct.h ../include/class.h ../include/numeric.h ! class.o: ../include/comstud.h ../include/common.h ../include/config.h class.c hash.o: ../include/config.h ../include/sys.h ../include/hash.h ! hash.o: ../include/comstud.h ../include/struct.h ../include/common.h s_serv.c s_user.c hash.o: channel.c s_misc.c s_bsd.c ircd.c hash.c version.c.SH version.o: version.c.SH version.c diff -c -r irc2.8.21+CSr24/ircd/channel.c irc2.8.21+CSr25/ircd/channel.c *** irc2.8.21+CSr24/ircd/channel.c Sat Jun 8 13:39:30 1996 --- irc2.8.21+CSr25/ircd/channel.c Mon Sep 9 10:54:28 1996 *************** *** 704,710 **** int parc; char *parv[]; { ! int mcount = 0, chanop; aChannel *chptr; if (check_registered(sptr)) --- 704,710 ---- int parc; char *parv[]; { ! int mcount = 0; aChannel *chptr; if (check_registered(sptr)) *************** *** 727,733 **** clean_channelname(parv[1]); if (check_channelmask(sptr, cptr, parv[1])) return 0; - chanop = is_chan_op(sptr, chptr) || IsServer(sptr); if (parc < 3) { --- 727,732 ---- *************** *** 740,746 **** } mcount = set_mode(cptr, sptr, chptr, parc - 2, parv + 2, modebuf, parabuf); - if (strlen(modebuf) > (size_t)1) switch (mcount) { --- 739,744 ---- *************** *** 755,761 **** { #ifndef DONT_SEND_FAKES #ifdef FK_USERMODES ! sendto_flagops(4,"Fake: %s MODE %s %s %s", parv[0], parv[1], modebuf, parabuf); #else sendto_ops("Fake: %s MODE %s %s %s", --- 753,759 ---- { #ifndef DONT_SEND_FAKES #ifdef FK_USERMODES ! sendto_flagops(FMODE,"Fake: %s MODE %s %s %s", parv[0], parv[1], modebuf, parabuf); #else sendto_ops("Fake: %s MODE %s %s %s", *************** *** 879,885 **** break; if (!ischop) sendto_one(sptr, err_str(ERR_CHANOPRIVSNEEDED), ! me.name, parv[0], chptr->chname); if (whatt == MODE_ADD) { lp = &chops[opcnt++]; --- 877,883 ---- break; if (!ischop) sendto_one(sptr, err_str(ERR_CHANOPRIVSNEEDED), ! me.name, sptr->name, chptr->chname); if (whatt == MODE_ADD) { lp = &chops[opcnt++]; Only in irc2.8.21+CSr24/ircd/crypt: exec Only in irc2.8.21+CSr24/ircd/crypt: mkpasswd diff -c -r irc2.8.21+CSr24/ircd/ircd.c irc2.8.21+CSr25/ircd/ircd.c *** irc2.8.21+CSr24/ircd/ircd.c Wed Jul 24 19:31:15 1996 --- irc2.8.21+CSr25/ircd/ircd.c Mon Sep 9 11:21:15 1996 *************** *** 98,107 **** int idlelimit = DEFAULT_IDLELIMIT; #endif - #ifdef LIMIT_UH - int uhlimit = LIMIT_UH; - #endif - time_t NOW; aClient me; /* That's me */ aClient *client = &me; /* Pointer to beginning of Client list */ --- 98,103 ---- *************** *** 114,119 **** --- 110,116 ---- char **myargv; int portnum = -1; /* Server port number, listening this */ char *configfile = CONFIGFILE; /* Server configuration file */ + char *klinefile = KLINEFILE; /* Config file for klines */ int debuglevel = -1; /* Server debug level */ int bootopt = 0; /* Server boot option flags */ char *debugmode = ""; /* -"- -"- -"- */ *************** *** 401,408 **** --- 398,409 ---- } #ifdef IDLE_CHECK idleflag = (checkit2 && IsPerson(cptr)) ? (idlelimit && !IsAnOper(cptr) && + #ifdef E_LINES (currenttime-cptr->user->last > idlelimit) && !find_eline(cptr)) : 0; + #else + (currenttime-cptr->user->last > idlelimit)) : 0; + #endif /* E_LINES */ if (idleflag) { if (!find_idle(cptr)) *************** *** 419,425 **** } #endif killflag = (checkit && IsPerson(cptr)) ? ! find_kill(cptr) : 0; #ifdef R_LINES_OFTEN rflag = (checkit && IsPerson(cptr)) ? find_restrict(cptr) : 0; #endif --- 420,426 ---- } #endif killflag = (checkit && IsPerson(cptr)) ? ! find_kill(cptr, 0) : 0; #ifdef R_LINES_OFTEN rflag = (checkit && IsPerson(cptr)) ? find_restrict(cptr) : 0; #endif *************** *** 598,608 **** 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 --- 599,604 ---- *************** *** 728,734 **** exit(-1); } #endif ! #ifndef IRC_UID if ((uid != euid) && !euid) { --- 724,734 ---- exit(-1); } #endif ! #ifdef BETTER_MOTD ! motd = NULL; ! motd_tm = NULL; ! read_motd(MOTD); ! #endif #ifndef IRC_UID if ((uid != euid) && !euid) { *************** *** 811,817 **** #ifdef USE_SYSLOG openlog(myargv[0], LOG_PID|LOG_NDELAY, LOG_FACILITY); #endif ! if (initconf(bootopt) == -1) { Debug((DEBUG_FATAL, "Failed in reading configuration file %s", configfile)); --- 811,817 ---- #ifdef USE_SYSLOG openlog(myargv[0], LOG_PID|LOG_NDELAY, LOG_FACILITY); #endif ! if (initconf(bootopt,configfile) == -1) { Debug((DEBUG_FATAL, "Failed in reading configuration file %s", configfile)); *************** *** 819,824 **** --- 819,825 ---- configfile); exit(-1); } + initconf(bootopt,klinefile); if (!(bootopt & BOOT_INETD)) { static char star[] = "*"; diff -c -r irc2.8.21+CSr24/ircd/s_bsd.c irc2.8.21+CSr25/ircd/s_bsd.c *** irc2.8.21+CSr24/ircd/s_bsd.c Wed Jul 24 18:25:14 1996 --- irc2.8.21+CSr25/ircd/s_bsd.c Wed Sep 11 17:02:16 1996 *************** *** 65,70 **** --- 65,75 ---- #ifdef USE_POLL #include #include + #ifndef SOL20 + typedef struct pollfd pollfd_t; + #define POLLWRNORM POLLOUT + #define POLLRDNORM 0x0040 + #endif #endif /* USE_POLL_ */ #ifdef AIX *************** *** 259,265 **** } else if (cptr->fd >= MAXCLIENTS) { ! sendto_flagops(6,"No more connections allowed (%s)", cptr->name); (void)close(cptr->fd); return -1; } --- 264,270 ---- } else if (cptr->fd >= MAXCLIENTS) { ! sendto_flagops(UMODE,"No more connections allowed (%s)", cptr->name); (void)close(cptr->fd); return -1; } *************** *** 377,383 **** } else if (cptr->fd >= MAXCLIENTS) { ! sendto_flagops(6,"No more connections allowed (%s)", cptr->name); (void)close(cptr->fd); return -1; } --- 382,388 ---- } else if (cptr->fd >= MAXCLIENTS) { ! sendto_flagops(UMODE,"No more connections allowed (%s)", cptr->name); (void)close(cptr->fd); return -1; } *************** *** 456,461 **** --- 461,467 ---- void init_sys() { Reg1 int fd; + #ifndef USE_POLL #ifdef RLIMIT_FD_MAX struct rlimit limit; *************** *** 499,504 **** --- 505,511 ---- } # endif #endif + #endif /* USE_POLL */ #if defined(PCS) || defined(DYNIXPTX) || defined(SVR3) char logbuf[BUFSIZ]; *************** *** 1431,1437 **** if (dbuf_put(&cptr->recvQ, readbuf, length) < 0) return exit_client(cptr, cptr, cptr, "dbuf_put fail"); ! if (IsPerson(cptr) && DBufLength(&cptr->recvQ) > CLIENT_FLOOD) return exit_client(cptr, cptr, cptr, "Excess Flood"); --- 1438,1444 ---- if (dbuf_put(&cptr->recvQ, readbuf, length) < 0) return exit_client(cptr, cptr, cptr, "dbuf_put fail"); ! if (IsPerson(cptr) && !IsAnOper(cptr) && DBufLength(&cptr->recvQ) > CLIENT_FLOOD) return exit_client(cptr, cptr, cptr, "Excess Flood"); *************** *** 1575,1580 **** --- 1582,1588 ---- continue; if (IsMe(cptr) && IsListening(cptr)) { + #define CONNECTFAST #ifdef CONNECTFAST /* next line was 2, changing to 1 */ /* if we dont have many clients just let em on */ *************** *** 1992,1998 **** res++; if (res > 5) restart("too many poll errors"); ! sleep(10); NOW = time(NULL); } --- 2000,2006 ---- res++; if (res > 5) restart("too many poll errors"); ! usleep(10); NOW = time(NULL); } diff -c -r irc2.8.21+CSr24/ircd/s_conf.c irc2.8.21+CSr25/ircd/s_conf.c *** irc2.8.21+CSr24/ircd/s_conf.c Wed Jul 24 19:49:12 1996 --- irc2.8.21+CSr25/ircd/s_conf.c Mon Sep 9 15:42:09 1996 *************** *** 642,648 **** clear_conf_list(&EList2, 1); clear_conf_list(&EList3, 1); #endif /* E_LINES */ ! (void) initconf(0); close_listeners(); /* --- 642,649 ---- clear_conf_list(&EList2, 1); clear_conf_list(&EList3, 1); #endif /* E_LINES */ ! (void) initconf(0, configfile); ! (void) initconf(0, klinefile); close_listeners(); /* *************** *** 676,682 **** * configuration file from. This may either be th4 file direct or one end * of a pipe from m4. */ ! int openconf() { #ifdef M4_PREPROC int pi[2], i; --- 677,684 ---- * configuration file from. This may either be th4 file direct or one end * of a pipe from m4. */ ! int openconf(filename) ! char *filename; { #ifdef M4_PREPROC int pi[2], i; *************** *** 703,709 **** * goes out with report_error. Could be dangerous, * two servers running with the same fd's >:-) -avalon */ ! (void)execlp("m4", "m4", "ircd.m4", configfile, 0); report_error("Error executing m4 %s:%s", &me); exit(-1); default : --- 705,711 ---- * goes out with report_error. Could be dangerous, * two servers running with the same fd's >:-) -avalon */ ! (void)execlp("m4", "m4", "ircd.m4", filename, 0); report_error("Error executing m4 %s:%s", &me); exit(-1); default : *************** *** 711,717 **** return pi[0]; } #else ! return open(configfile, O_RDONLY); #endif } extern char *getfield(); --- 713,719 ---- return pi[0]; } #else ! return open(filename, O_RDONLY); #endif } extern char *getfield(); *************** *** 726,733 **** #define MAXCONFLINKS 150 ! int initconf(opt) int opt; { static char quotes[9][2] = {{'b', '\b'}, {'f', '\f'}, {'n', '\n'}, {'r', '\r'}, {'t', '\t'}, {'v', '\v'}, --- 728,736 ---- #define MAXCONFLINKS 150 ! int initconf(opt, filename) int opt; + char *filename; { static char quotes[9][2] = {{'b', '\b'}, {'f', '\f'}, {'n', '\n'}, {'r', '\r'}, {'t', '\t'}, {'v', '\v'}, *************** *** 738,745 **** int ccount = 0, ncount = 0; aConfItem *aconf = NULL; ! Debug((DEBUG_DEBUG, "initconf(): ircd.conf = %s", configfile)); ! if ((fd = openconf()) == -1) { #ifdef M4_PREPROC (void)wait(0); --- 741,748 ---- int ccount = 0, ncount = 0; aConfItem *aconf = NULL; ! Debug((DEBUG_DEBUG, "initconf(): ircd.conf = %s", filename)); ! if ((fd = openconf(filename)) == -1) { #ifdef M4_PREPROC (void)wait(0); *************** *** 1144,1151 **** return (*comment == ''); } ! int find_kill(cptr) aClient *cptr; { char reply[256], *host, *name; aConfItem *tmp; --- 1147,1199 ---- return (*comment == ''); } ! #ifdef NO_REDUNDANT_KLINES ! ! int test_kline_userhost(sptr, List, kuser, khost) ! aClient *sptr; ! aConfList *List; ! char *kuser, *khost; ! { ! register aConfItem *tmp; ! register int current; ! char *host, *pass, *name; ! static char null[] = ""; ! int port; ! ! if (!List || !List->conf_list) ! return 0; ! ! for (current = 0; current < List->length; current++) ! { ! aConfEntry *ptr = &List->conf_list[current]; ! ! for(; ptr; ptr = ptr->next) ! { ! if (ptr->sub) ! if (test_kline_userhost(sptr, ptr->sub, kuser, khost)) ! return 1; ! if (!(tmp = ptr->conf)) ! continue; ! host = BadPtr(tmp->host) ? null : tmp->host; ! pass = BadPtr(tmp->passwd) ? null : tmp->passwd; ! name = BadPtr(tmp->name) ? null : tmp->name; ! port = (int)tmp->port; ! if (tmp->status == CONF_KILL) ! if (!match(name,kuser) && !match(host,khost)) ! { ! sendto_one(sptr, ":%s NOTICE %s :K: line not added. %s@%s already matched by %s@%s", me.name, sptr->name, kuser, khost, name, host ); ! return 1; ! } ! } ! } ! return 0; ! } ! ! #endif ! ! int find_kill(cptr, checkuh) aClient *cptr; + int checkuh; { char reply[256], *host, *name; aConfItem *tmp; *************** *** 1240,1262 **** */ #ifdef LIMIT_UH ! if (!tmp && uhlimit) { register aClient *sptr; register int i; ! int num = 0; ! for (i = highest_fd; i >= 0; i--) { if (!(sptr=local[i]) || !IsPerson(sptr)) continue; if (!strcmp(sptr->user->username, name) && !strcmp(sptr->sockhost, host)) ! if (++num >= uhlimit) { ! sendto_one(cptr, ":%s NOTICE %s :This server is currently limited to %i client%s per user", ! me.name, cptr->name, uhlimit, uhlimit==1?"":"s"); ! sendto_flagops(5, "Rejecting for too many clients: %s [%s@%s]", cptr->name, cptr->user->username, cptr->user->host); return 1; } --- 1288,1317 ---- */ #ifdef LIMIT_UH ! if (!tmp && checkuh) { register aClient *sptr; register int i; ! int num = 0, tot; ! int cc = get_client_class(cptr); ! aClass *cs; ! ! cs = find_class(cc); ! tot = get_con_freq(cs); ! if (tot) for (i = highest_fd; i >= 0; i--) { if (!(sptr=local[i]) || !IsPerson(sptr)) continue; + if (cc != get_client_class(sptr)) + continue; if (!strcmp(sptr->user->username, name) && !strcmp(sptr->sockhost, host)) ! if (++num >= tot) { ! sendto_one(cptr, ":%s NOTICE %s :This server is currently limited to %i client%s per user in your class", ! me.name, cptr->name, tot, tot==1?"":"s"); ! sendto_flagops(LMODE, "Rejecting for too many clients: %s [%s@%s]", cptr->name, cptr->user->username, cptr->user->host); return 1; } diff -c -r irc2.8.21+CSr24/ircd/s_err.c irc2.8.21+CSr25/ircd/s_err.c *** irc2.8.21+CSr24/ircd/s_err.c Sat Jun 8 13:39:34 1996 --- irc2.8.21+CSr25/ircd/s_err.c Mon Sep 9 12:14:37 1996 *************** *** 40,48 **** /* 002 */ RPL_YOURHOST, ":Your host is %s, running version %s", /* 003 */ RPL_CREATED, ":This server was created %s", #ifdef FK_USERMODES ! /* 004 */ RPL_MYINFO, "%s %s oiwsfrcuk biklmnopstv", #else ! /* 004 */ RPL_MYINFO, "%s %s oiwsucr biklmnopstv", #endif 0, (char *)NULL }; --- 40,48 ---- /* 002 */ RPL_YOURHOST, ":Your host is %s, running version %s", /* 003 */ RPL_CREATED, ":This server was created %s", #ifdef FK_USERMODES ! /* 004 */ RPL_MYINFO, "%s %s oiwsfcukbdl biklmnopstv", #else ! /* 004 */ RPL_MYINFO, "%s %s oiwsucbdl biklmnopstv", #endif 0, (char *)NULL }; diff -c -r irc2.8.21+CSr24/ircd/s_misc.c irc2.8.21+CSr25/ircd/s_misc.c *** irc2.8.21+CSr24/ircd/s_misc.c Sat Jun 8 13:39:29 1996 --- irc2.8.21+CSr25/ircd/s_misc.c Sun Sep 15 12:25:33 1996 *************** *** 327,344 **** --- 327,352 ---- switch(which) { case 1: + #ifdef FNAME_USERLOG if (userbuflen+len >= ULOGBUFFERLEN-1) doit++; filename = FNAME_USERLOG; buffer = userbuf; len2 = &userbuflen; + #else + return; + #endif break; case 2: + #ifdef FNAME_CLONELOG if (clonebuflen+len >= CLOGBUFFERLEN-1) doit++; filename = FNAME_CLONELOG; buffer = clonebuf; len2 = &clonebuflen; + #else + return; + #endif break; } if (!len || doit) *************** *** 410,416 **** sptr->flags |= FLAGS_CLOSING; #ifdef CLIENT_NOTICES if (IsPerson(sptr)) ! sendto_flagops(2, "Client exiting: %s [%s@%s]", sptr->name, sptr->user->username, sptr->user->host); #endif --- 418,424 ---- sptr->flags |= FLAGS_CLOSING; #ifdef CLIENT_NOTICES if (IsPerson(sptr)) ! sendto_flagops(CMODE, "Client exiting: %s (%s@%s)", sptr->name, sptr->user->username, sptr->user->host); #endif *************** *** 491,496 **** --- 499,511 ---- ** together into exit_one_client() to provide some useful ** information about where the net is broken. Ian */ + + /* The above comment says that only server connections can have depending + remote clients. This is true, and I don't see this changing...so I'm + adding in this if(), because looking thru all the clients is really + really lame -- Comstud */ + if (IsServer(sptr)) + { (void)strcpy(comment1, me.name); (void)strcat(comment1," "); (void)strcat(comment1, sptr->name); *************** *** 509,516 **** if (IsServer(acptr) && acptr->from == sptr) exit_one_client(NULL, acptr, &me, me.name); } ! } ! exit_one_client(cptr, sptr, from, comment); return cptr == sptr ? FLUSH_BUFFER : 0; } --- 524,531 ---- if (IsServer(acptr) && acptr->from == sptr) exit_one_client(NULL, acptr, &me, me.name); } ! } /* IsServer */ ! } /* MyConnect */ exit_one_client(cptr, sptr, from, comment); return cptr == sptr ? FLUSH_BUFFER : 0; } diff -c -r irc2.8.21+CSr24/ircd/s_serv.c irc2.8.21+CSr25/ircd/s_serv.c *** irc2.8.21+CSr24/ircd/s_serv.c Wed Jul 24 21:38:36 1996 --- irc2.8.21+CSr25/ircd/s_serv.c Wed Sep 11 17:00:56 1996 *************** *** 63,69 **** { max_connection_count = m_clients + m_servers; if (max_connection_count % 10 == 0) ! sendto_flagops(1, "New highest connections: %d (%d clients)", max_connection_count, max_client_count); } --- 63,69 ---- { max_connection_count = m_clients + m_servers; if (max_connection_count % 10 == 0) ! sendto_flagops(OPERS, "New highest connections: %d (%d clients)", max_connection_count, max_client_count); } *************** *** 289,343 **** #endif - #ifdef LIMIT_UH - - int m_limituh(cptr, sptr, parc, parv) - aClient *cptr, *sptr; - int parc; - char *parv[]; - { - int temp; - - if (!MyClient(sptr) || !IsAnOper(sptr)) - { - sendto_one(sptr, err_str(ERR_NOPRIVILEGES), me.name, parv[0]); - return 0; - } - if (!parv[1] || !*parv[1]) - { - if (uhlimit) - sendto_one(sptr, ":%s NOTICE %s :The current limit for the number of same u@h's is %i", - me.name, parv[0], uhlimit); - else - sendto_one(sptr, ":%s NOTICE %s :There is currently no limit for the number of same u@h's", - me.name, parv[0]); - return 0; - } - temp = atoi(parv[1]); - if (temp < 0) - { - sendto_one(sptr, ":%s NOTICE %s :Hello??? Try a number >= 0.", - me.name, parv[0]); - return 0; - } - if (uhlimit = temp) - { - sendto_flagops(1,"%s has changed the u@h limit to %i.", - parv[0], uhlimit); - sendto_one(sptr, ":%s NOTICE %s :The u@h limit is now set to %i.", - me.name, parv[0], uhlimit); - } - else - { - sendto_flagops(1,"%s has disabled the u@h limit.", parv[0]); - sendto_one(sptr, ":%s NOTICE %s :The u@h limit is now disabled.", - me.name, parv[0]); - } - return 0; - } - - #endif - /* ** m_version ** parv[0] = sender prefix --- 289,294 ---- *************** *** 1369,1374 **** --- 1320,1326 ---- char *parv[]; { static char Lformat[] = ":%s %d %s %s %u %u %u %u %u :%u"; + static char CSformat[] = ":%s %d %s %s %u %u %u %u %u %u :%s"; struct Message *mptr; aClient *acptr; char stat = parc > 1 ? parv[1][0] : '\0'; *************** *** 1396,1402 **** name = me.name; #ifdef STATS_NOTICE if (stat != (char) 0) ! sendto_flagops(1,"STATS %c requested by %s (%s@%s)", stat, sptr->name, sptr->user->username, sptr->user->host); #endif switch (stat) --- 1348,1354 ---- name = me.name; #ifdef STATS_NOTICE if (stat != (char) 0) ! sendto_flagops(OPERS,"STATS %c requested by %s (%s@%s)", stat, sptr->name, sptr->user->username, sptr->user->host); #endif switch (stat) *************** *** 1410,1425 **** #else for (i=serv_fdlist.entry[j=1];j<=serv_fdlist.last_entry; i=serv_fdlist.entry[++j]) if (!(acptr=local[i])) continue; - { #endif ! sendto_one(sptr, ":%s NOTICE %s :%s %s %u :%u", ! me.name, parv[0], ! get_client_name(acptr, TRUE), ! DoesTS(acptr) ? "TS" : "NoTS", ! (int)DBufLength(&acptr->sendQ), ! NOW - acptr->firsttime); } break; case 'L' : case 'l' : --- 1362,1379 ---- #else for (i=serv_fdlist.entry[j=1];j<=serv_fdlist.last_entry; i=serv_fdlist.entry[++j]) + { if (!(acptr=local[i])) continue; #endif ! sendto_one(sptr, CSformat, me.name, ! RPL_STATSLINKINFO, parv[0], ! get_client_name(acptr, TRUE), ! (int)DBufLength(&acptr->sendQ), ! (int)acptr->sendM, (int)acptr->sendK, ! (int)acptr->receiveM, (int)acptr->receiveK, ! NOW - acptr->firsttime, DoesTS(acptr) ? ! "TS" : "NoTS"); } break; case 'L' : case 'l' : *************** *** 2041,2046 **** --- 1995,2004 ---- char tempuser[30]; char temphost[512]; aConfItem *aconf; + char timebuffer[20]; + char filenamebuf[1024]; + char *filename; + struct tm *tmptr; if (!MyClient(sptr) || #ifdef NO_LOCAL_KLINE *************** *** 2096,2101 **** --- 2054,2065 ---- user = tempuser; host = cluster(acptr->user->host); } + #ifdef NO_REDUNDANT_KLINES + if (test_kline_userhost(sptr, &KList1, user, host) || + test_kline_userhost(sptr, &KList2, user, host) || + test_kline_userhost(sptr, &KList3, user, host)) + return 0; + #endif if (!matches(user, "akjhfkahfasfjd") && !matches(host, "ldksjfl.ksskdjfd.jfklsjf")) { *************** *** 2131,2144 **** MyFree(host); } rehashed = 1; /* Forces looping thru clients to check k-lines */ ! sendto_flagops(1,"%s added K-Line for [%s@%s]: %s", parv[0], user, host, parv[2] && *parv[2] ? parv[2] : "No reason"); ! sendto_one(sptr, ":%s NOTICE %s :Added K-Line [%s@%s] to server configfile", me.name, parv[0], user, host); ! if ((out = open(configfile, O_WRONLY|O_APPEND))==-1) { sendto_one(sptr, ":%s NOTICE %s :Problem opening server configfile", me.name, parv[0]); return 0; } irc_sprintf(buffer, "#%s!%s@%s K'd: %s@%s: %s\n", sptr->name, sptr->user->username, sptr->user->host, user, host, --- 2095,2120 ---- MyFree(host); } rehashed = 1; /* Forces looping thru clients to check k-lines */ ! sendto_flagops(OPERS,"%s added K-Line for [%s@%s]: %s", parv[0], user, host, parv[2] && *parv[2] ? parv[2] : "No reason"); ! #ifdef PUT_KLINES_IN_IRCD_CONF ! filename = configfile; ! #elif defined(SEPARATE_QUOTE_KLINES_BY_DATE) ! tmptr = localtime(&NOW); ! strftime(timebuffer, 20, "%y%m%d", tmptr); ! sprintf(filenamebuf, "%s.%s", klinefile, timebuffer); ! filename = filenamebuf; ! #else ! filename = klinefile; ! #endif ! if ((out = open(filename, O_RDWR|O_APPEND|O_CREAT))==-1) { sendto_one(sptr, ":%s NOTICE %s :Problem opening server configfile", me.name, parv[0]); return 0; } + #ifdef SEPARATE_QUOTE_KLINES_BY_DATE + fchmod(out, 432); + #endif irc_sprintf(buffer, "#%s!%s@%s K'd: %s@%s: %s\n", sptr->name, sptr->user->username, sptr->user->host, user, host, *************** *** 2155,2160 **** --- 2131,2138 ---- if (write(out, buffer, strlen(buffer)) <= 0) sendto_one(sptr, ":%s NOTICE %s :Problem writing to the configfile", me.name, parv[0]); close(out); + sendto_one(sptr, ":%s NOTICE %s :Added K-Line [%s@%s] to configfile", me.name, parv[0], user, host); + return 0; } *************** *** 2422,2431 **** void read_motd(filename) char *filename; { ! register aMotd *temp, *last; ! struct stat sb; ! char buffer[81], *blah; ! FILE *st; while(motd) { --- 2400,2410 ---- void read_motd(filename) char *filename; { ! int fd; ! register aMotd *temp, *last; ! struct stat sb; ! char line[80]; ! register char *tmp; while(motd) { *************** *** 2433,2454 **** MyFree(motd); motd = temp; } ! st = fopen(filename, "rt"); ! if (!st) return; ! 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) ! *blah = (char) 0; temp = (aMotd *) MyMalloc(sizeof(aMotd)); if (!temp) outofmemory(); ! strcpy(temp->line, buffer); temp->next = NULL; if (!motd) motd = temp; --- 2412,2435 ---- MyFree(motd); motd = temp; } ! ! ! if ((fd = open(MOTD, O_RDONLY)) == -1) return; ! (void)fstat(fd, &sb); ! motd_tm = localtime(&sb.st_mtime); ! (void)dgets(-1, NULL, 0); /* make sure buffer is at empty pos */ last = NULL; ! while (dgets(fd, line, sizeof(line)-1) > 0) { ! if ((tmp = (char *)index(line,'\n'))) ! *tmp = '\0'; ! if ((tmp = (char *)index(line,'\r'))) ! *tmp = '\0'; temp = (aMotd *) MyMalloc(sizeof(aMotd)); if (!temp) outofmemory(); ! strcpy(temp->line, line); temp->next = NULL; if (!motd) motd = temp; *************** *** 2456,2462 **** last->next = temp; last = temp; } ! fclose(st); } #endif --- 2437,2444 ---- last->next = temp; last = temp; } ! (void)dgets(-1, NULL, 0); /* make sure buffer is at empty pos */ ! (void)close(fd); } #endif diff -c -r irc2.8.21+CSr24/ircd/s_user.c irc2.8.21+CSr25/ircd/s_user.c *** irc2.8.21+CSr24/ircd/s_user.c Wed Jul 24 20:16:19 1996 --- irc2.8.21+CSr25/ircd/s_user.c Thu Sep 12 12:47:28 1996 *************** *** 69,75 **** #ifdef FK_USERMODES FLAGS_KMODE, 'k', #endif ! FLAGS_RMODE, 'r', 0, 0 }; /* --- 69,77 ---- #ifdef FK_USERMODES FLAGS_KMODE, 'k', #endif ! FLAGS_DMODE, 'd', ! FLAGS_BMODE, 'b', ! FLAGS_LMODE, 'l', 0, 0 }; /* *************** *** 415,421 **** strncpyzt(user->username, temp, USERLEN+1); if ((i = check_client(sptr, temp))) { ! sendto_flagops(6,"%s from %s.", i == -3 ? "Too many connections" : "Unauthorized connection", get_client_host(sptr)); --- 417,423 ---- strncpyzt(user->username, temp, USERLEN+1); if ((i = check_client(sptr, temp))) { ! sendto_flagops(UMODE,"%s from %s.", i == -3 ? "Too many connections" : "Unauthorized connection", get_client_host(sptr)); *************** *** 445,453 **** --- 447,459 ---- strncpyzt(user->username, sptr->username, USERLEN+1); else { + #ifdef IDENTD_ONLY *user->username = '~'; (void)strncpy(&user->username[1], origuser, USERLEN); user->username[USERLEN] = '\0'; + #else + strncpyzt(user->username, origuser, USERLEN+1); + #endif } if (!BadPtr(aconf->passwd) && !StrEq(sptr->passwd, aconf->passwd)) *************** *** 459,465 **** } bzero(sptr->passwd, sizeof(sptr->passwd)); ! if (find_kill(sptr)) { ircstp->is_ref++; return exit_client(cptr, sptr, &me, "K-lined"); --- 465,471 ---- } bzero(sptr->passwd, sizeof(sptr->passwd)); ! if (find_kill(sptr, 1)) { ircstp->is_ref++; return exit_client(cptr, sptr, &me, "K-lined"); *************** *** 500,506 **** #ifdef NO_MIXED_CASE if (lower && upper) { ! sendto_flagops(5, "Invalid username: %s [%s@%s]", nick, username, user->host); ircstp->is_ref++; return exit_client(cptr, sptr, &me, "Invalid username"); --- 506,512 ---- #ifdef NO_MIXED_CASE if (lower && upper) { ! sendto_flagops(BMODE, "Invalid username: %s [%s@%s]", nick, username, user->host); ircstp->is_ref++; return exit_client(cptr, sptr, &me, "Invalid username"); *************** *** 509,515 **** #ifdef NO_SPECIAL if (special) { ! sendto_flagops(5,"Invalid username: %s [%s@%s]", nick, user->username, user->host); ircstp->is_ref++; return exit_client(cptr, sptr, &me, "Invalid username"); --- 515,521 ---- #ifdef NO_SPECIAL if (special) { ! sendto_flagops(BMODE,"Invalid username: %s [%s@%s]", nick, user->username, user->host); ircstp->is_ref++; return exit_client(cptr, sptr, &me, "Invalid username"); *************** *** 531,537 **** #if defined(BOTS_NOTICE) || defined(REJECT_BOTS) if (reject == 1) { ! sendto_flagops(5,"%s vlad/joh/com bot: %s [%s@%s]", bottype, nick, user->username, user->host); #ifdef REJECT_BOTS --- 537,543 ---- #if defined(BOTS_NOTICE) || defined(REJECT_BOTS) if (reject == 1) { ! sendto_flagops(BMODE,"%s vlad/joh/com bot: %s [%s@%s]", bottype, nick, user->username, user->host); #ifdef REJECT_BOTS *************** *** 541,547 **** } if ((reject == 2) || strstr(nick, "LameHelp")) { ! sendto_flagops(5,"%s eggdrop bot: %s [%s@%s]", bottype, nick, user->username, user->host); #ifdef REJECT_BOTS --- 547,553 ---- } if ((reject == 2) || strstr(nick, "LameHelp")) { ! sendto_flagops(BMODE,"%s eggdrop bot: %s [%s@%s]", bottype, nick, user->username, user->host); #ifdef REJECT_BOTS *************** *** 551,557 **** } if (reject == 3) { ! sendto_flagops(5,"%s ojnk/annoy bot: %s [%s@%s]", bottype, nick, user->username, user->host); #ifdef REJECT_BOTS --- 557,563 ---- } if (reject == 3) { ! sendto_flagops(BMODE,"%s ojnk/annoy bot: %s [%s@%s]", bottype, nick, user->username, user->host); #ifdef REJECT_BOTS *************** *** 561,567 **** } if (reject == 4) { ! sendto_flagops(5,"%s Guardian bot: %s [%s@%s]", bottype, nick, user->username, user->host); #ifdef REJECT_BOTS --- 567,573 ---- } if (reject == 4) { ! sendto_flagops(BMODE,"%s Guardian bot: %s [%s@%s]", bottype, nick, user->username, user->host); #ifdef REJECT_BOTS *************** *** 572,578 **** if (!matches("*bot*", nick)||!matches("*Serv*", nick)|| !matches("*help*", nick)) { ! sendto_flagops(5,"%s bot: %s [%s@%s]", bottype, nick, user->username, user->host); #ifdef REJECT_BOTS --- 578,584 ---- if (!matches("*bot*", nick)||!matches("*Serv*", nick)|| !matches("*help*", nick)) { ! sendto_flagops(BMODE,"%s bot: %s [%s@%s]", bottype, nick, user->username, user->host); #ifdef REJECT_BOTS *************** *** 588,594 **** if (NOW <= (blahidle->last+60)) { blahidle->last += 60; /* Add 60 seconds */ ! sendto_flagops(1,"Rejecting idle exceeder %s [%s@%s]", nick, user->username, user->host); ircstp->is_ref++; return exit_client(cptr, sptr, &me, "No bots allowed"); --- 594,600 ---- if (NOW <= (blahidle->last+60)) { blahidle->last += 60; /* Add 60 seconds */ ! sendto_flagops(OPERS,"Rejecting idle exceeder %s [%s@%s]", nick, user->username, user->host); ircstp->is_ref++; return exit_client(cptr, sptr, &me, "No bots allowed"); *************** *** 611,617 **** clone->num++; clone->last = NOW; if (clone->num == NUM_CLONES) ! sendto_flagops(1, "CloneBot protection activated against %s", user->host); if (clone->num >= NUM_CLONES) { #ifdef FNAME_CLONELOG --- 617,623 ---- clone->num++; clone->last = NOW; if (clone->num == NUM_CLONES) ! sendto_flagops(OPERS, "CloneBot protection activated against %s", user->host); if (clone->num >= NUM_CLONES) { #ifdef FNAME_CLONELOG *************** *** 632,638 **** } #endif /* BUFFERED_LOGS */ #endif /* FNAME_CLONELOG */ ! sendto_flagops(1, "Rejecting clonebot: %s [%s@%s]", nick, username, user->host); #ifdef KILL_CLONES strcpy(clonekillhost, user->host); --- 638,644 ---- } #endif /* BUFFERED_LOGS */ #endif /* FNAME_CLONELOG */ ! sendto_flagops(OPERS, "Rejecting clonebot: %s [%s@%s]", nick, username, user->host); #ifdef KILL_CLONES strcpy(clonekillhost, user->host); *************** *** 648,659 **** #endif #ifdef CLIENT_NOTICES ! sendto_flagops(2,"Client connecting: %s [%s@%s]", nick, user->username, user->host); #endif /* CLIENT_NOTICES */ if (sptr->flags & FLAGS_GOTID) if (strcmp(origuser, sptr->username)) ! sendto_flagops(1,"Identd response differs: %s [%s]", nick, origuser); } else strncpyzt(user->username, username, USERLEN+1); --- 654,665 ---- #endif #ifdef CLIENT_NOTICES ! sendto_flagops(CMODE,"Client connecting: %s (%s@%s)", nick, user->username, user->host); #endif /* CLIENT_NOTICES */ if (sptr->flags & FLAGS_GOTID) if (strcmp(origuser, sptr->username)) ! sendto_flagops(DMODE,"Identd response differs: %s [%s]", nick, origuser); } else strncpyzt(user->username, username, USERLEN+1); *************** *** 769,800 **** *s = '\0'; strncpyzt(nick, parv[1], NICKLEN+1); - #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), - me.name, sptr->name); - return 0; - } - } - #endif /* * if do_nick_name() returns a null name OR if the server sent a nick * name and do_nick_name() changed it in some way (due to rules of nick --- 775,780 ---- *************** *** 848,853 **** --- 828,860 ---- BadPtr(parv[0]) ? "*" : parv[0], nick); return 0; /* NICK message ignored */ } + #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(OPERS,"Nick flooding detected by: %s (%s@%s)", + sptr->name, sptr->user->username, sptr->user->host); + sendto_one(sptr, err_str(ERR_TOOMANYNICKS), + me.name, sptr->name); + return 0; + } + } + #endif + /* ** acptr already has result from previous find_server() */ *************** *** 860,866 **** ** there is no danger of the server being disconnected. ** Ultimate way to jupiter a nick ? >;-). -avalon */ ! sendto_flagops(4,"Nick collision on %s(%s <- %s)", sptr->name, acptr->from->name, get_client_name(cptr, FALSE)); ircstp->is_kill++; --- 867,873 ---- ** there is no danger of the server being disconnected. ** Ultimate way to jupiter a nick ? >;-). -avalon */ ! sendto_flagops(FMODE,"Nick collision on %s(%s <- %s)", sptr->name, acptr->from->name, get_client_name(cptr, FALSE)); ircstp->is_kill++; *************** *** 959,965 **** if (!doests || !newts || !acptr->tsinfo || (newts == acptr->tsinfo)) { ! sendto_flagops(4,"Nick collision on %s(%s <- %s)(both killed)", acptr->name, acptr->from->name, get_client_name(cptr, FALSE)); ircstp->is_kill++; --- 966,972 ---- if (!doests || !newts || !acptr->tsinfo || (newts == acptr->tsinfo)) { ! sendto_flagops(FMODE,"Nick collision on %s(%s <- %s)(both killed)", acptr->name, acptr->from->name, get_client_name(cptr, FALSE)); ircstp->is_kill++; *************** *** 983,993 **** else { if (sameuser) ! sendto_flagops(4,"Nick collision on %s(%s <- %s)(older killed)", acptr->name, acptr->from->name, get_client_name(cptr, FALSE)); else ! sendto_flagops(4,"Nick collision on %s(%s <- %s)(newer killed)", acptr->name, acptr->from->name, get_client_name(cptr, FALSE)); --- 990,1000 ---- else { if (sameuser) ! sendto_flagops(FMODE,"Nick collision on %s(%s <- %s)(older killed)", acptr->name, acptr->from->name, get_client_name(cptr, FALSE)); else ! sendto_flagops(FMODE,"Nick collision on %s(%s <- %s)(newer killed)", acptr->name, acptr->from->name, get_client_name(cptr, FALSE)); *************** *** 1018,1024 **** newts = 0; if (!doests || !newts || !acptr->tsinfo || (newts == acptr->tsinfo)) { ! sendto_flagops(4,"Nick change collision from %s to %s(%s <- %s)(both killed)", sptr->name, acptr->name, acptr->from->name, get_client_name(cptr, FALSE)); ircstp->is_kill++; --- 1025,1031 ---- newts = 0; if (!doests || !newts || !acptr->tsinfo || (newts == acptr->tsinfo)) { ! sendto_flagops(FMODE,"Nick change collision from %s to %s(%s <- %s)(both killed)", sptr->name, acptr->name, acptr->from->name, get_client_name(cptr, FALSE)); ircstp->is_kill++; *************** *** 1042,1052 **** (!sameuser && newts > acptr->tsinfo)) { if (sameuser) ! sendto_flagops(4,"Nick change collision from %s to %s(%s <- %s)(older killed)", sptr->name, acptr->name, acptr->from->name, get_client_name(cptr, FALSE)); else ! sendto_flagops(4,"Nick change collision from %s to %s(%s <- %s)(newer killed)", sptr->name, acptr->name, acptr->from->name, get_client_name(cptr, FALSE)); ircstp->is_kill++; --- 1049,1059 ---- (!sameuser && newts > acptr->tsinfo)) { if (sameuser) ! sendto_flagops(FMODE,"Nick change collision from %s to %s(%s <- %s)(older killed)", sptr->name, acptr->name, acptr->from->name, get_client_name(cptr, FALSE)); else ! sendto_flagops(FMODE,"Nick change collision from %s to %s(%s <- %s)(newer killed)", sptr->name, acptr->name, acptr->from->name, get_client_name(cptr, FALSE)); ircstp->is_kill++; *************** *** 1063,1073 **** else { if (sameuser) ! sendto_flagops(4,"Nick collision on %s(%s <- %s)(older killed)", acptr->name, acptr->from->name, get_client_name(cptr, FALSE)); else ! sendto_flagops(4,"Nick collision on %s(%s <- %s)(newer killed)", acptr->name, acptr->from->name, get_client_name(cptr, FALSE)); --- 1070,1080 ---- else { if (sameuser) ! sendto_flagops(FMODE,"Nick collision on %s(%s <- %s)(older killed)", acptr->name, acptr->from->name, get_client_name(cptr, FALSE)); else ! sendto_flagops(FMODE,"Nick collision on %s(%s <- %s)(newer killed)", acptr->name, acptr->from->name, get_client_name(cptr, FALSE)); *************** *** 2001,2010 **** } if (strchr(parv[0], '.')) ! sendto_flagops(4,"Received KILL message for %s. From %s Path: %s!%s", acptr->name, parv[0], inpath, path); else ! sendto_flagops(3,"Received KILL message for %s. From %s Path: %s!%s", acptr->name, parv[0], inpath, path); #if defined(USE_SYSLOG) && defined(SYSLOG_KILL) --- 2008,2017 ---- } if (strchr(parv[0], '.')) ! sendto_flagops(FMODE,"Received KILL message for %s. From %s Path: %s!%s", acptr->name, parv[0], inpath, path); else ! sendto_flagops(KMODE,"Received KILL message for %s. From %s Path: %s!%s", acptr->name, parv[0], inpath, path); #if defined(USE_SYSLOG) && defined(SYSLOG_KILL) *************** *** 2388,2394 **** } #endif #ifdef FAILED_OPER_NOTICE ! sendto_flagops(1,"Failed OPER attempt: %s (%s@%s) [%s]", parv[0], sptr->user->username, sptr->sockhost, name); #endif } --- 2395,2401 ---- } #endif #ifdef FAILED_OPER_NOTICE ! sendto_flagops(OPERS,"Failed OPER attempt: %s (%s@%s) [%s]", parv[0], sptr->user->username, sptr->sockhost, name); #endif }