diff -c -r -N irc2.8.21+CSr4/Makefile irc2.8.21+CSr5/Makefile *** irc2.8.21+CSr4/Makefile Wed Jun 21 13:16:08 1995 --- irc2.8.21+CSr5/Makefile Sun Jul 2 21:44:00 1995 *************** *** 83,89 **** # IRCDDIR must be the same as DPATH in include/config.h # ! IRCDDIR=/home/irc/irc2.8.21+CSr4/lib SHELL=/bin/sh SUBDIRS=common ircd --- 83,89 ---- # IRCDDIR must be the same as DPATH in include/config.h # ! # IRCDDIR=/home/irc/irc2.8.21+CSr4/lib SHELL=/bin/sh SUBDIRS=common ircd diff -c -r -N irc2.8.21+CSr4/include/comstud.h irc2.8.21+CSr5/include/comstud.h *** irc2.8.21+CSr4/include/comstud.h Tue Jun 20 01:56:58 1995 --- irc2.8.21+CSr5/include/comstud.h Sun Jul 2 23:19:55 1995 *************** *** 113,119 **** for all /opers including local (o:) ones */ ! #define OPER_CAN_FLOOD1 /* OPER_CAN_FLOOD2 - define this if you want only O: opers to be able to flood --- 113,119 ---- for all /opers including local (o:) ones */ ! #undef OPER_CAN_FLOOD1 /* OPER_CAN_FLOOD2 - define this if you want only O: opers to be able to flood *************** *** 121,126 **** --- 121,150 ---- #undef OPER_CAN_FLOOD2 + /* STATS_NOTICE - send a notice to /opers on the server when + someone does /stats requests + (Non-useful...just used to see who's spying ;) + */ + + #define STATS_NOTICE + + /* FAILED_OPER_NOTICE - send a notice to all opers when someone + tries to /oper and uses an incorrect pw + */ + + #define FAILED_OPER_NOTICE + + /* FNAME_FAILED_OPER - define this as a filename of a logfile + if you wish to log when someone tries + to /oper and uses an incorrect pw + Note: The filename must exist before logging + will take place. + Note: #undef FNAME_FAILED_OPER if you don't + want them logged + */ + + #define FNAME_FAILED_OPER "/home/irc/irc2.8.21+CSr5/lib/logs/failed.log" + /* CLIENT_NOTICES - define this if you wish to see client connecting and exiting notices via /umode +c */ *************** *** 203,210 **** and you wish to log clones */ ! #define FNAME_CLONELOG "/home/irc/irc2.8.21+CSr4/logs/clones.log" ! /* DEFAULT_IDLELIMIT - if you have CHECK_IDLE defined above, this value is the default # a client --- 227,233 ---- and you wish to log clones */ ! #define FNAME_CLONELOG "/home/irc/irc2.8.21+CSr5/logs/clones.log" /* DEFAULT_IDLELIMIT - if you have CHECK_IDLE defined above, this value is the default # a client diff -c -r -N irc2.8.21+CSr4/include/config.h irc2.8.21+CSr5/include/config.h *** irc2.8.21+CSr4/include/config.h Wed Jun 21 12:50:25 1995 --- irc2.8.21+CSr5/include/config.h Sun Jul 2 21:43:47 1995 *************** *** 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+CSr4/lib" /* dir where all ircd stuff is */ ! #define SPATH "/home/irc/irc2.8.21+CSr4/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 */ --- 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+CSr5/lib" /* dir where all ircd stuff is */ ! #define SPATH "/home/irc/irc2.8.21+CSr5/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+CSr4/logs/users.log" /* */ ! #define FNAME_OPERLOG "/home/irc/irc2.8.21+CSr4/logs/opers.log" /* */ /* CHROOTDIR * --- 117,124 ---- * successful use of /oper. These are either full paths or files within DPATH. */ ! #define FNAME_USERLOG "/home/irc/irc2.8.21+CSr5/logs/users.log" /* */ ! #define FNAME_OPERLOG "/home/irc/irc2.8.21+CSr5/logs/opers.log" /* */ /* CHROOTDIR * diff -c -r -N irc2.8.21+CSr4/include/patchlevel.h irc2.8.21+CSr5/include/patchlevel.h *** irc2.8.21+CSr4/include/patchlevel.h Sun Jul 2 23:18:19 1995 --- irc2.8.21+CSr5/include/patchlevel.h Sat Jun 24 17:33:01 1995 *************** *** 17,21 **** */ #ifndef PATCHLEVEL ! #define PATCHLEVEL "2.8.21+CSr4" #endif --- 17,21 ---- */ #ifndef PATCHLEVEL ! #define PATCHLEVEL "2.8.21+CSr5" #endif diff -c -r -N irc2.8.21+CSr4/ircd/ircd.c irc2.8.21+CSr5/ircd/ircd.c *** irc2.8.21+CSr4/ircd/ircd.c Mon Jun 19 08:09:42 1995 --- irc2.8.21+CSr5/ircd/ircd.c Mon Jul 3 02:33:50 1995 *************** *** 415,421 **** { if (cptr->user && cptr->user->host && !mycmp(cptr->user->host, clonekillhost) && ! ((now - cptr->firsttime) < CLONE_TIME)) { ircstp->is_kill++; sendto_ops("Clonebot killed: %s [%s@%s]", --- 415,421 ---- { if (cptr->user && cptr->user->host && !mycmp(cptr->user->host, clonekillhost) && ! ((currenttime - cptr->firsttime) < CLONE_TIME)) { ircstp->is_kill++; sendto_ops("Clonebot killed: %s [%s@%s]", diff -c -r -N irc2.8.21+CSr4/ircd/s_serv.c irc2.8.21+CSr5/ircd/s_serv.c *** irc2.8.21+CSr4/ircd/s_serv.c Mon Jun 19 07:36:44 1995 --- irc2.8.21+CSr5/ircd/s_serv.c Sun Jul 2 23:25:41 1995 *************** *** 1058,1064 **** } else name = me.name; ! switch (stat) { case 'L' : case 'l' : --- 1058,1068 ---- } else 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) { case 'L' : case 'l' : *************** *** 1749,1756 **** strcpy(temphost, ""); strcat(temphost, host); user = tempuser; - if (*user == '~') - user++; host = temphost; } else --- 1753,1758 ---- *************** *** 1760,1771 **** strcpy(tempuser, "*"); strcat(tempuser, acptr->user->username); user = tempuser; - if (*user == '~') - user++; host = cluster(acptr->user->host); } if (!matches(user, "akjhfkahfasfjd") && ! !matches(host, "ldksjflksdjfklsjf")) { sendto_one(sptr, ":%s NOTICE %s :Can't K-Line *@*", me.name, parv[0]); --- 1762,1773 ---- strcpy(tempuser, "*"); strcat(tempuser, acptr->user->username); user = tempuser; host = cluster(acptr->user->host); } + if (*user == '~') + user++; if (!matches(user, "akjhfkahfasfjd") && ! !matches(host, "ldksjfl.ksskdjfd.jfklsjf")) { sendto_one(sptr, ":%s NOTICE %s :Can't K-Line *@*", me.name, parv[0]); *************** *** 1778,1784 **** } if (parv[2] && *parv[2]) { ! irc_sprintf(buffer, "# %s@%s: %s\n", user, host, parv[2]); if (write(out, buffer, strlen(buffer)) <= 0) { --- 1780,1788 ---- } if (parv[2] && *parv[2]) { ! irc_sprintf(buffer, "#%s!%s@%s K'd: %s@%s: %s\n", ! sptr->name, sptr->user->username, ! sptr->user->host, user, host, parv[2]); if (write(out, buffer, strlen(buffer)) <= 0) { diff -c -r -N irc2.8.21+CSr4/ircd/s_user.c irc2.8.21+CSr5/ircd/s_user.c *** irc2.8.21+CSr4/ircd/s_user.c Mon Jun 19 23:16:27 1995 --- irc2.8.21+CSr5/ircd/s_user.c Sun Jul 2 23:15:12 1995 *************** *** 454,460 **** "%s: Clonebot rejected: %s!%s@%s\n", myctime(time(NULL)), parv[0], sptr->user->username, ! sptr->sockhost); (void)write(logfile, buf, strlen(buf)); (void)close(logfile); } --- 454,460 ---- "%s: Clonebot rejected: %s!%s@%s\n", myctime(time(NULL)), parv[0], sptr->user->username, ! sptr->user->host); (void)write(logfile, buf, strlen(buf)); (void)close(logfile); } *************** *** 2021,2028 **** --- 2021,2042 ---- } else { + int logfile; + (void)detach_conf(sptr, aconf); sendto_one(sptr,err_str(ERR_PASSWDMISMATCH),me.name, parv[0]); + #ifdef FNAME_FAILED_OPER + if ((logfile=open(FNAME_FAILED_OPER, O_WRONLY|O_APPEND)) != -1) + { + (void)irc_sprintf(buf, + "%s: %s!%s@%s tried (%s) %s\n", + myctime(time(NULL)), sptr->name, + sptr->user->username, + sptr->user->host, name, password); + (void)write(logfile, buf, strlen(buf)); + (void)close(logfile); + } + #endif #ifdef FAILED_OPER_NOTICE sendto_flagops(1,"Failed OPER attempt: %s (%s@%s) [%s]", parv[0], sptr->user->username, sptr->sockhost, name);