diff -c -N -r irc2.8.21+CSr9/common/parse.c irc2.8.21+CSr10/common/parse.c *** irc2.8.21+CSr9/common/parse.c Sat Aug 12 15:31:18 1995 --- irc2.8.21+CSr10/common/parse.c Mon Aug 21 03:55:05 1995 *************** *** 487,511 **** 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 --- 487,507 ---- aClient *cptr, *sptr; char *cmd; { ! sendto_ops("Message from %s[%s] != %s", sptr->name, ! sptr->from->name, get_client_name(cptr, TRUE)); if (IsServer(sptr) || IsMe(sptr)) { sendto_ops("Not dropping link: %s", cptr->name); return -1; } if (IsServer(cptr)) { ! sendto_serv_butone(NULL, ":%s KILL %s :%s (%s[%s] != %s)", ! me.name, sptr->name, me.name, ! sptr->name, sptr->from->name, ! get_client_name(cptr, TRUE)); ! sptr->flags |= FLAGS_KILLED; ! return exit_client(cptr, sptr, &me, "Fake Prefix"); } /* Fake prefix came from a client of mine...something is screwed with it, so we can exit this one diff -c -N -r irc2.8.21+CSr9/common/send.c irc2.8.21+CSr10/common/send.c *** irc2.8.21+CSr9/common/send.c Sat Aug 12 13:32:47 1995 --- irc2.8.21+CSr10/common/send.c Mon Aug 21 03:58:02 1995 *************** *** 32,37 **** --- 32,38 ---- #include "sys.h" #include "h.h" #include + #include "numeric.h" #ifdef DOG3 #include "fdlist.h" *************** *** 801,807 **** (((flag == 1) && IsAnOper(cptr)) || ((flag == 2) && IsAnOper(cptr) && IsCMode(cptr)) || ((flag == 3) && IsKMode(cptr)) || ! ((flag == 4) && IsFMode(cptr)))) { (void)irc_sprintf(nbuf, ":%s NOTICE %s :*** Notice -- ", me.name, cptr->name); --- 802,809 ---- (((flag == 1) && IsAnOper(cptr)) || ((flag == 2) && IsAnOper(cptr) && IsCMode(cptr)) || ((flag == 3) && IsKMode(cptr)) || ! ((flag == 4) && IsFMode(cptr)) || ! ((flag == 5) && IsRMode(cptr)))) { (void)irc_sprintf(nbuf, ":%s NOTICE %s :*** Notice -- ", me.name, cptr->name); *************** *** 977,982 **** --- 979,1012 ---- #else par = p1; #endif + /* This if() checks to make sure we don't send the same + message back to the place we received it from. This + occurs when a client becomes ghosted and 2 servers + have different information about the client. + -- Taner & Comstud + */ + if (from && to && !MyClient(from) && + IsPerson(to) && (to->from == from->from)) + { + if (IsServer(from)) + { + sendto_ops("Send message to %s[%s] from %s would have caused Fake Direction", + to->name, to->from->name, from->name); + return; + } + sendto_ops("Send message failed to ghosted %s[%s] from %s[%s]", + to->name, to->from->name, from->name, + from->from->name); + sendto_serv_butone(NULL, ":%s KILL %s :%s (%s[%s@%s] Ghosted)", + me.name, to->name, me.name, to->name, + to->user->username, to->user->host); + to->flags |= FLAGS_KILLED; + (void)exit_client(NULL, to, &me, "Ghost"); + if (IsPerson(from)) + sendto_one(from, err_str(ERR_GHOSTEDCLIENT), + me.name, to->name); + return; + } if (to && from && MyClient(to) && IsPerson(from) && !mycmp(par, from->name)) { diff -c -N -r irc2.8.21+CSr9/include/comstud.h irc2.8.21+CSr10/include/comstud.h *** irc2.8.21+CSr9/include/comstud.h Mon Aug 14 16:13:53 1995 --- irc2.8.21+CSr10/include/comstud.h Mon Aug 21 03:55:06 1995 *************** *** 52,57 **** --- 52,63 ---- #define NO_LOCAL_KLINE + /* USE_UH - define this if you want to use n!u@h + for BAN_INFO + */ + + #define USE_UH + /* BAN_INFO - define this if you want to see who did bans and when they were done */ *************** *** 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 --- 177,183 ---- want them logged */ ! #define FNAME_FAILED_OPER "/home/irc/irc2.8.21+CSr10/lib/logs/failed.log" /* CLIENT_NOTICES - define this if you wish to see client connecting and exiting notices via /umode +c *************** *** 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 --- 261,267 ---- and you wish to log clones */ ! #define FNAME_CLONELOG "/home/irc/irc2.8.21+CSr10/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+CSr9/include/config.h irc2.8.21+CSr10/include/config.h *** irc2.8.21+CSr9/include/config.h Mon Aug 14 16:14:06 1995 --- irc2.8.21+CSr10/include/config.h Mon Aug 21 03:55:06 1995 *************** *** 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 */ --- 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+CSr10/lib" /* dir where all ircd stuff is */ ! #define SPATH "/home/irc/irc2.8.21+CSr10/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 */ *************** *** 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 * --- 122,129 ---- * successful use of /oper. These are either full paths or files within DPATH. */ ! #define FNAME_USERLOG "/home/irc/irc2.8.21+CSr10/logs/users.log" /* */ ! #define FNAME_OPERLOG "/home/irc/irc2.8.21+CSr10/logs/opers.log" /* */ /* CHROOTDIR * diff -c -N -r irc2.8.21+CSr9/include/dog3.h irc2.8.21+CSr10/include/dog3.h *** irc2.8.21+CSr9/include/dog3.h Sat Aug 12 14:09:44 1995 --- irc2.8.21+CSr10/include/dog3.h Mon Aug 21 03:55:06 1995 *************** *** 5,12 **** #define TRUE 1 #endif ! #define LOADCFREQ 5 ! #define LOADRECV 35 #define FDLISTCHKFREQ 2 #endif --- 5,12 ---- #define TRUE 1 #endif ! #define DEFAULT_LOADCFREQ 5 ! #define DEFAULT_LOADRECV 35 #define FDLISTCHKFREQ 2 #endif diff -c -N -r irc2.8.21+CSr9/include/h.h irc2.8.21+CSr10/include/h.h *** irc2.8.21+CSr9/include/h.h Sun Aug 13 23:04:47 1995 --- irc2.8.21+CSr10/include/h.h Mon Aug 21 03:55:06 1995 *************** *** 33,38 **** --- 33,40 ---- extern fdlist default_fdlist; /* just the number of the entry */ extern fdlist auth_fdlist; extern int lifesux; + extern int dog3loadcfreq; + extern int dog3loadrecv; #endif #ifdef CLONE_CHECK diff -c -N -r irc2.8.21+CSr9/include/msg.h irc2.8.21+CSr10/include/msg.h *** irc2.8.21+CSr9/include/msg.h Sat Aug 12 12:01:45 1995 --- irc2.8.21+CSr10/include/msg.h Mon Aug 21 03:55:06 1995 *************** *** 68,73 **** --- 68,77 ---- #ifdef IDLE_CHECK #define MSG_IDLE "IDLE" /* IDLE */ #endif + #ifdef DOG3 + #define MSG_DOG3LOAD "DOG3LOAD" /* DOG3LOAD */ + #define MSG_DOG3FREQ "DOG3FREQ" /* DOG3FREQ */ + #endif #define MSG_NOTE "NOTE" /* NOTE */ #define MSG_SQUERY "SQUERY" /* SQUE */ #define MSG_SERVLIST "SERVLIST" /* SERV -> SLIS */ *************** *** 86,91 **** --- 90,99 ---- #ifdef IDLE_CHECK extern int m_idle(); #endif + #ifdef DOG3 + extern int m_dog3load(); + extern int m_dog3freq(); + #endif #ifdef QUOTE_KLINE extern int m_kline(); #endif *************** *** 164,169 **** --- 172,181 ---- #ifdef IDLE_CHECK { MSG_IDLE, m_idle, 0, MAXPARA, 1 ,0L }, #endif + #ifdef DOG3 + { MSG_DOG3LOAD, m_dog3load, 0, MAXPARA, 1 ,0L }, + { MSG_DOG3FREQ, m_dog3freq, 0, MAXPARA, 1 ,0L }, + #endif #ifdef QUOTE_KLINE { MSG_KLINE, m_kline, 0, MAXPARA, 1 ,0L }, #endif diff -c -N -r irc2.8.21+CSr9/include/numeric.h irc2.8.21+CSr10/include/numeric.h *** irc2.8.21+CSr9/include/numeric.h Sat Aug 12 13:38:16 1995 --- irc2.8.21+CSr10/include/numeric.h Sun Aug 20 16:20:03 1995 *************** *** 201,206 **** --- 201,208 ---- #define ERR_UMODEUNKNOWNFLAG 501 #define ERR_USERSDONTMATCH 502 + #define ERR_GHOSTEDCLIENT 503 + /* * Numberic replies from server commands. * These are currently in the range 200-399. diff -c -N -r irc2.8.21+CSr9/include/patchlevel.h irc2.8.21+CSr10/include/patchlevel.h *** irc2.8.21+CSr9/include/patchlevel.h Sat Aug 12 12:02:33 1995 --- irc2.8.21+CSr10/include/patchlevel.h Mon Aug 21 03:55:06 1995 *************** *** 17,21 **** */ #ifndef PATCHLEVEL ! #define PATCHLEVEL "2.8.21+CSr9" #endif --- 17,21 ---- */ #ifndef PATCHLEVEL ! #define PATCHLEVEL "2.8.21+CSr10" #endif diff -c -N -r irc2.8.21+CSr9/include/struct.h irc2.8.21+CSr10/include/struct.h *** irc2.8.21+CSr9/include/struct.h Sat Aug 12 13:40:29 1995 --- irc2.8.21+CSr10/include/struct.h Mon Aug 21 03:55:06 1995 *************** *** 169,177 **** #define FLAGS_FMODE 0x100000 /* +f usermode */ #define FLAGS_CMODE 0x200000 /* +c usermode */ #define FLAGS_KMODE 0x400000 /* +k usermode */ #define SEND_UMODES (FLAGS_INVISIBLE|FLAGS_OPER|FLAGS_WALLOP) ! #define ALL_UMODES (SEND_UMODES|FLAGS_SERVNOTICE|FLAGS_CMODE|FLAGS_KMODE|FLAGS_FMODE) #define FLAGS_ID (FLAGS_DOID|FLAGS_GOTID) /* --- 169,179 ---- #define FLAGS_FMODE 0x100000 /* +f usermode */ #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) /* *************** *** 183,189 **** --- 185,193 ---- #define IsAnOper(x) ((x)->flags & (FLAGS_OPER|FLAGS_LOCOP)) #define IsFMode(x) ((x)->flags & FLAGS_FMODE) #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) diff -c -N -r irc2.8.21+CSr9/ircd/channel.c irc2.8.21+CSr10/ircd/channel.c *** irc2.8.21+CSr9/ircd/channel.c Sat Aug 12 13:42:35 1995 --- irc2.8.21+CSr10/ircd/channel.c Mon Aug 21 03:55:06 1995 *************** *** 205,212 **** --- 205,227 ---- #ifdef BAN_INFO ban->value.ban.banstr = (char *)MyMalloc(strlen(banid)+1); (void)strcpy(ban->value.ban.banstr, banid); + #ifdef USE_UH + if (IsPerson(cptr)) + { + ban->value.ban.who = + (char *)MyMalloc(strlen(cptr->name)+ + strlen(cptr->user->username)+strlen(cptr->user->host)+3); + (void)sprintf(ban->value.ban.who, "%s!%s@%s", + cptr->name, cptr->user->username, cptr->user->host); + } + else + { + #endif ban->value.ban.who = (char *)MyMalloc(strlen(cptr->name)+1); (void)strcpy(ban->value.ban.who, cptr->name); + #ifdef USE_UH + } + #endif ban->value.ban.when = time(NULL); #else ban->value.cp = (char *)MyMalloc(strlen(banid)+1); diff -c -N -r irc2.8.21+CSr9/ircd/ircd.c irc2.8.21+CSr10/ircd/ircd.c *** irc2.8.21+CSr9/ircd/ircd.c Mon Aug 14 16:16:22 1995 --- irc2.8.21+CSr10/ircd/ircd.c Mon Aug 21 05:35:58 1995 *************** *** 46,51 **** --- 46,53 ---- fdlist default_fdlist; /* just the number of the entry */ fdlist auth_fdlist; int lifesux = 0; + int dog3loadcfreq = DEFAULT_LOADCFREQ; + int dog3loadrecv = DEFAULT_LOADRECV; time_t check_fdlists(); *************** *** 767,795 **** 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: ; --- 769,801 ---- static time_t lasttime=0; static long lastrecvK; static int init=0; ! static time_t loadcfreq=DEFAULT_LOADCFREQ; if (now-lasttime < loadcfreq) goto done_check; ! if (me.receiveK - dog3loadrecv > lastrecvK) { if (!lifesux) { + sendto_ops("Entering high-traffic mode - %uk/%us > %uk/%us", + me.receiveK-lastrecvK, now-lasttime, + dog3loadrecv, now-lasttime); loadcfreq *= 2; /* add hysteresis */ lifesux = TRUE; } } else { ! loadcfreq = dog3loadcfreq; if (lifesux) { lifesux = 0; ! sendto_ops("Resuming standard operation - %uk/%us <= %uk/%us", ! me.receiveK-lastrecvK, now-lasttime, ! dog3loadrecv, now-lasttime); } } + lasttime = now; lastrecvK = me.receiveK; done_check: ; diff -c -N -r irc2.8.21+CSr9/ircd/s_conf.c irc2.8.21+CSr10/ircd/s_conf.c *** irc2.8.21+CSr9/ircd/s_conf.c Sat Aug 12 14:35:15 1995 --- irc2.8.21+CSr10/ircd/s_conf.c Mon Aug 21 03:55:07 1995 *************** *** 1026,1031 **** --- 1026,1037 ---- return -1; } + static int is_comment(comment) + char *comment; + { + return (*comment == ''); + } + int find_kill(cptr) aClient *cptr; { *************** *** 1049,1065 **** (match(tmp->host, host) == 0) && (!name || match(tmp->name, name) == 0) && (!tmp->port || (tmp->port == cptr->acpt->port))) ! if (BadPtr(tmp->passwd) || ! check_time_interval(tmp->passwd, reply)) ! break; ! if (reply[0]) sendto_one(cptr, reply, me.name, ERR_YOUREBANNEDCREEP, cptr->name); else if (tmp) ! sendto_one(cptr, err_str(ERR_YOUREBANNEDCREEP), me.name, ! cptr->name); ! return (tmp ? -1 : 0); } --- 1055,1076 ---- (match(tmp->host, host) == 0) && (!name || match(tmp->name, name) == 0) && (!tmp->port || (tmp->port == cptr->acpt->port))) ! { ! if (BadPtr(tmp->passwd)) ! break; ! if (is_comment(tmp->passwd)) ! break; ! if (check_time_interval(tmp->passwd, reply)) ! break; ! } if (reply[0]) sendto_one(cptr, reply, me.name, ERR_YOUREBANNEDCREEP, cptr->name); else if (tmp) ! sendto_one(cptr, err_str(ERR_YOUREBANNEDCREEP), ! me.name, cptr->name, ! (BadPtr(tmp->passwd) || !is_comment(tmp->passwd)) ? ! "" : tmp->passwd); return (tmp ? -1 : 0); } diff -c -N -r irc2.8.21+CSr9/ircd/s_err.c irc2.8.21+CSr10/ircd/s_err.c *** irc2.8.21+CSr9/ircd/s_err.c Sat Aug 12 20:36:24 1995 --- irc2.8.21+CSr10/ircd/s_err.c Mon Aug 21 03:55:07 1995 *************** *** 19,24 **** --- 19,25 ---- #include "struct.h" #include "numeric.h" + #include "comstud.h" #ifndef lint static char sccsid[] = "@(#)s_err.c 1.12 11/1/93 (C) 1992 Darren Reed"; *************** *** 38,44 **** /* 001 */ RPL_WELCOME, ":Welcome to the Internet Relay Network %s", /* 002 */ RPL_YOURHOST, ":Your host is %s, running version %s", /* 003 */ RPL_CREATED, ":This server was created %s", ! /* 004 */ RPL_MYINFO, "%s %s oiws biklmnopstv", 0, (char *)NULL }; --- 39,49 ---- /* 001 */ RPL_WELCOME, ":Welcome to the Internet Relay Network %s", /* 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 oiwsfuckr biklmnopstv", ! #else ! /* 004 */ RPL_MYINFO, "%s %s oiwsucr biklmnopstv", ! #endif 0, (char *)NULL }; *************** *** 99,105 **** /* 462 */ ERR_ALREADYREGISTRED, ":You may not reregister", /* 463 */ ERR_NOPERMFORHOST, ":Your host isn't among the privileged", /* 464 */ ERR_PASSWDMISMATCH, ":Password Incorrect", ! /* 465 */ ERR_YOUREBANNEDCREEP, ":You are banned from this server", /* 466 */ ERR_YOUWILLBEBANNED, (char *)NULL, /* 467 */ ERR_KEYSET, "%s :Channel key already set", 0, (char *)NULL, 0, (char *)NULL, 0, (char *)NULL, --- 104,110 ---- /* 462 */ ERR_ALREADYREGISTRED, ":You may not reregister", /* 463 */ ERR_NOPERMFORHOST, ":Your host isn't among the privileged", /* 464 */ ERR_PASSWDMISMATCH, ":Password Incorrect", ! /* 465 */ ERR_YOUREBANNEDCREEP, ":You are banned from this server: %s", /* 466 */ ERR_YOUWILLBEBANNED, (char *)NULL, /* 467 */ ERR_KEYSET, "%s :Channel key already set", 0, (char *)NULL, 0, (char *)NULL, 0, (char *)NULL, *************** *** 125,130 **** --- 130,136 ---- 0, (char *)NULL, 0, (char *)NULL, /* 501 */ ERR_UMODEUNKNOWNFLAG, ":Unknown MODE flag", /* 502 */ ERR_USERSDONTMATCH, ":Cant change mode for other users", + /* 503 */ ERR_GHOSTEDCLIENT, "%s :Message could not be delivered to %s", 0, (char *)NULL }; diff -c -N -r irc2.8.21+CSr9/ircd/s_serv.c irc2.8.21+CSr10/ircd/s_serv.c *** irc2.8.21+CSr9/ircd/s_serv.c Sat Aug 12 20:38:27 1995 --- irc2.8.21+CSr10/ircd/s_serv.c Mon Aug 21 03:55:07 1995 *************** *** 108,113 **** --- 108,184 ---- ** non-NULL pointers. */ + #ifdef DOG3 + + int m_dog3freq(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]) + { + sendto_one(sptr, ":%s NOTICE %s :The current load check frequency is set at %i seconds", + me.name, parv[0], dog3loadcfreq); + return 0; + } + temp = atoi(parv[1]); + if (temp && (temp <= 0)) + { + sendto_one(sptr, ":%s NOTICE %s :Hello??? Try a number > 0.", + me.name, parv[0]); + return 0; + } + dog3loadcfreq = temp; + sendto_ops("%s has changed the load check frequency to %i second(s).", + parv[0], dog3loadcfreq); + sendto_one(sptr, ":%s NOTICE %s :The load check frequency is now set to %i second(s)", + me.name, parv[0], dog3loadcfreq); + return 0; + } + + int m_dog3load(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]) + { + sendto_one(sptr, ":%s NOTICE %s :The current load limit is set at %i kb", + me.name, parv[0], dog3loadrecv); + return 0; + } + temp = atoi(parv[1]); + if (temp && (temp < 0)) + { + sendto_one(sptr, ":%s NOTICE %s :Hello??? Try a number >= 0.", + me.name, parv[0]); + return 0; + } + dog3loadrecv = temp; + sendto_ops("%s has changed the load limit to %i kb.", + parv[0], dog3loadrecv); + sendto_one(sptr, ":%s NOTICE %s :The load limit is now set to %i kb", + me.name, parv[0], dog3loadrecv); + return 0; + } + + #endif /* DOG3 */ + + #ifdef IDLE_CHECK int m_idle(cptr, sptr, parc, parv) *************** *** 1823,1829 **** close(out); return 0; } ! irc_sprintf(buffer, "K:%s::%s\n", host, user); if (write(out, buffer, strlen(buffer)) <= 0) { sendto_one(sptr, ":%s NOTICE %s :Problem writing to the configfile", me.name, parv[0]); --- 1894,1902 ---- close(out); return 0; } ! irc_sprintf(buffer, "K:%s:%s%s:%s\n", host, ! (parv[2] && *parv[2]) ? "" : "", ! (parv[2] && *parv[2]) ? parv[2] : "", user); if (write(out, buffer, strlen(buffer)) <= 0) { sendto_one(sptr, ":%s NOTICE %s :Problem writing to the configfile", me.name, parv[0]); diff -c -N -r irc2.8.21+CSr9/ircd/s_user.c irc2.8.21+CSr10/ircd/s_user.c *** irc2.8.21+CSr9/ircd/s_user.c Sat Aug 12 15:05:04 1995 --- irc2.8.21+CSr10/ircd/s_user.c Mon Aug 21 03:55:07 1995 *************** *** 359,365 **** short oldstatus = sptr->status; anUser *user = sptr->user; int i; ! int nullhost; /* Moved this to make_user user->last = time(NULL); -- CS --- 359,365 ---- short oldstatus = sptr->status; anUser *user = sptr->user; int i; ! int reject = 0; /* Moved this to make_user user->last = time(NULL); -- CS *************** *** 369,375 **** if (MyConnect(sptr)) { ! nullhost = (strcmp(user->host, "null") == 0); if (sptr->flags & FLAGS_GOTID) temp = sptr->username; else --- 369,381 ---- if (MyConnect(sptr)) { ! if (!strcmp(user->host, "null")) ! reject = 1; /* Vlad/Com/Joh */ ! else if (!strcmp(user->host, "1")) ! reject = 2; /* EggDrop */ ! /* ! else if (!strcmp(user->host, ".")) ! reject = 3; /* Annoy/OJNK */ if (sptr->flags & FLAGS_GOTID) temp = sptr->username; else *************** *** 451,475 **** { #endif #ifdef REJECT_BOTS ! if (nullhost) { ircstp->is_ref++; ! sendto_flagops(1,"Rejecting joh/com bot: [%s!%s@%s]", nick, user->username, user->host); return exit_client(cptr, sptr, &me, "No bots allowed"); } ! if (strstr(nick, "LameHelp")) { ircstp->is_ref++; ! sendto_flagops(1,"Rejecting eggdrop bot: [%s!%s@%s]", nick, user->username, user->host); return exit_client(cptr, sptr, &me, "No bots allowed"); } if (!matches("*bot*", nick)||!matches("*Serv*", nick)|| !matches("*help*", nick)) { ircstp->is_ref++; ! sendto_flagops(1,"Rejecting bot: [%s!%s@%s]", nick, user->username, user->host); return exit_client(cptr, sptr, &me, "No bots allowed"); } --- 457,488 ---- { #endif #ifdef REJECT_BOTS ! if (reject == 1) { ircstp->is_ref++; ! sendto_flagops(5,"Rejecting vlad/joh/com bot: %s [%s@%s]", nick, user->username, user->host); return exit_client(cptr, sptr, &me, "No bots allowed"); } ! if ((reject == 2) || strstr(nick, "LameHelp")) { ircstp->is_ref++; ! sendto_flagops(5,"Rejecting eggdrop bot: %s [%s@%s]", nick, user->username, user->host); return exit_client(cptr, sptr, &me, "No bots allowed"); } + if (reject == 3) + { + ircstp->is_ref++; + sendto_flagops(5,"Rejecting ojnk/annoy bot: %s [%s@%s]", + nick, user->username, user->host); + return exit_client(cptr, sptr, &me, "No bots allowed"); + } if (!matches("*bot*", nick)||!matches("*Serv*", nick)|| !matches("*help*", nick)) { ircstp->is_ref++; ! sendto_flagops(5,"Rejecting bot: %s [%s@%s]", nick, user->username, user->host); return exit_client(cptr, sptr, &me, "No bots allowed"); } *************** *** 544,550 **** #ifdef NO_MIXED_CASE if (lower && upper) { ! sendto_flagops(1,"Invalid username: %s [%s@%s]", nick, username, user->host); ircstp->is_ref++; return exit_client(cptr, sptr, &me, "Invalid username"); --- 557,563 ---- #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"); *************** *** 553,559 **** #ifdef NO_SPECIAL if (special) { ! sendto_flagops(1,"Invalid username: %s [%s@%s]", nick, user->username, user->host); ircstp->is_ref++; return exit_client(cptr, sptr, &me, "Invalid username"); --- 566,572 ---- #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"); *************** *** 566,572 **** if (!matches("* vc:*", sptr->info)) { ircstp->is_ref++; ! sendto_flagops(1, "Rejecting IPhone user: [%s!%s@%s]", nick, user->username, user->host); return exit_client(cptr, sptr, &me, "No IPhone users"); } --- 579,585 ---- if (!matches("* vc:*", sptr->info)) { ircstp->is_ref++; ! sendto_flagops(5, "Rejecting IPhone user: [%s!%s@%s]", nick, user->username, user->host); return exit_client(cptr, sptr, &me, "No IPhone users"); } *************** *** 2288,2299 **** --- 2301,2314 ---- #ifdef FK_USERMODES FLAGS_FMODE, 'f', #endif + FLAGS_UMODE, 'u', #ifdef CLIENT_NOTICES FLAGS_CMODE, 'c', #endif #ifdef FK_USERMODES FLAGS_KMODE, 'k', #endif + FLAGS_RMODE, 'r', 0, 0 }; /*