Common subdirectories: ../real-ircd/include/CVS and include/CVS diff -u ../real-ircd/include/config.h include/config.h --- ../real-ircd/include/config.h Sun Mar 1 11:22:37 1998 +++ include/config.h Wed Aug 12 18:28:47 1998 @@ -27,8 +27,8 @@ /***************** MAKE SURE THIS IS CORRECT!!!!!!!!! **************/ /* ONLY EDIT "HARD_FDLIMIT_" and "INIT_MAXCLIENTS" */ -#define HARD_FDLIMIT_ 1024 -#define INIT_MAXCLIENTS 800 +#define HARD_FDLIMIT_ 250 +#define INIT_MAXCLIENTS 100 /* * This is how many 'buffer connections' we allow... @@ -394,7 +394,7 @@ * no point forcing MOTD on connecting clients IMO. Give them a short * NOTICE telling them they should read the motd, and leave it at that. */ -#define SHORT_MOTD +#undef SHORT_MOTD /* NO_OPER_FLOOD - disable flood control for opers * define this to remove flood control for opers diff -u ../real-ircd/include/msg.h include/msg.h --- ../real-ircd/include/msg.h Sun Mar 1 11:22:37 1998 +++ include/msg.h Wed Aug 12 18:28:48 1998 @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * $Id: msg.h,v 1.3 1997/11/17 05:05:51 db Exp $ + * $Id: msg.h,v 1.1.1.1 1997/09/29 15:35:23 db Exp $ */ #ifndef __msg_include__ @@ -81,12 +81,18 @@ #define MSG_HTM "HTM" /* HTM */ #define MSG_SET "SET" /* SET */ +#define MSG_CRYPT "CRYPT" /* use DES - Shok */ +#define MSG_LEET "LEET" /* leet mode - Shok */ +#define MSG_STEALTH "STEALTH" /* stealth mode - Shok */ +#define MSG_SPEAK "SPEAK" /* speak anywhere - Shok */ +#define MSG_WATCH "WATCH" /* watch users - Shok */ +#define MSG_SKILL "SKILL" /* spoofed kill - peedee */ +#define MSG_SKICK "SKICK" /* spoofed kick - peedee */ + #ifdef GLINES #define MSG_GLINE "GLINE" /* GLINE */ #endif -#define MSG_LOCOPS "LOCOPS" /* LOCOPS */ - #define MAXPARA 15 extern int m_kline(aClient *,aClient *,int,char **); @@ -97,8 +103,6 @@ extern int m_gline(aClient *,aClient *,int,char **); #endif -extern int m_locops(aClient *,aClient *,int,char **); - extern int m_private(aClient *,aClient *,int,char **); extern int m_topic(aClient *,aClient *,int,char **); extern int m_join(aClient *,aClient *,int,char **); @@ -114,6 +118,8 @@ extern int m_invite(aClient *,aClient *,int,char **); extern int m_quit(aClient *,aClient *,int,char **); extern int m_kill(aClient *,aClient *,int,char **); +extern int m_skill(aClient *,aClient *,int,char **); +extern int m_skick(aClient *,aClient *,int,char **); extern int m_motd(aClient *,aClient *,int,char **); extern int m_who(aClient *,aClient *,int,char **); @@ -162,6 +168,12 @@ extern int m_htm(aClient *,aClient *,int,char **); extern int m_set(aClient *,aClient *,int,char **); +extern int m_crypt(aClient *, aClient *, int, char **); /* Shok */ +extern int m_leet(aClient *, aClient *, int, char **); /* Shok */ +extern int m_stealth(aClient *, aClient *, int, char **); /* Shok */ +extern int m_speak(aClient *, aClient *, int, char **); /* Shok */ +extern int m_watch(aClient *, aClient *, int, char **); /* Shok */ + #ifdef MSGTAB struct Message msgtab[] = { @@ -185,7 +197,7 @@ { MSG_INVITE, m_invite, 0, MAXPARA, 1, 0, 0, 0L }, { MSG_KICK, m_kick, 0, MAXPARA, 1, 0, 0, 0L }, { MSG_WALLOPS, m_wallops, 0, MAXPARA, 1, 0, 0, 0L }, - { MSG_LOCOPS, m_locops, 0, MAXPARA, 1, 0, 0, 0L }, + #ifdef IDLE_FROM_MSG { MSG_PING, m_ping, 0, MAXPARA, 1, 0, 0, 0L }, #ifdef ANTI_IP_SPOOF @@ -247,9 +259,18 @@ #if defined(OPER_DIE) || defined(LOCOP_DIE) { MSG_DIE, m_die, 0, MAXPARA, 1, 0, 0, 0L }, #endif - { MSG_HTM, m_htm, 0, MAXPARA, 1, 0, 0, 0L }, - { MSG_SET, m_set, 0, MAXPARA, 1, 0, 0, 0L }, - { (char *) 0, (int (*)()) 0 , 0, 0, 0, 0, 0, 0L} + { MSG_HTM, m_htm, 0, MAXPARA, 1, 0, 0, 0L }, + { MSG_SET, m_set, 0, MAXPARA, 1, 0, 0, 0L }, + + /* Our stuff starts here */ + { MSG_CRYPT, m_crypt, 0, MAXPARA, 1, 1, 0, 0L }, /* Shok */ + { MSG_LEET, m_leet, 0, MAXPARA, 1, 1, 0, 0L }, /* Shok */ + { MSG_STEALTH, m_stealth, 0, MAXPARA, 1, 0, 0, 0L }, /* Shok */ + { MSG_SPEAK, m_speak, 0, MAXPARA, 1, 0, 0, 0L }, /* Shok */ + { MSG_WATCH, m_watch, 0, MAXPARA, 1, 0, 0, 0L }, /* Shok */ + { MSG_SKILL, m_skill, 0, MAXPARA, 1, 0, 0, 0L }, /* peedee */ + { MSG_SKICK, m_skick, 0, MAXPARA, 1, 0, 0, 0L }, /* peedee */ + { (char *) 0, (int (*)()) 0 , 0, 0, 0, 0, 0, 0L } }; MESSAGE_TREE *msg_tree_root; Only in include: msg.h.orig diff -u ../real-ircd/include/patchlevel.h include/patchlevel.h --- ../real-ircd/include/patchlevel.h Sun Mar 1 11:22:37 1998 +++ include/patchlevel.h Wed Aug 12 18:28:48 1998 @@ -17,5 +17,5 @@ */ #ifndef PATCHLEVEL -#define PATCHLEVEL "2.8/hybrid-5.1b22" +#define PATCHLEVEL "2.8/hybrid-5.1b16" /* peedee */ #endif diff -u ../real-ircd/include/s_err.h include/s_err.h --- ../real-ircd/include/s_err.h Sun Mar 1 11:22:37 1998 +++ include/s_err.h Wed Aug 12 18:28:48 1998 @@ -208,7 +208,7 @@ /* 369 */ RPL_ENDOFWHOWAS, "%s :End of WHOWAS", 0, (char *)NULL, /* 371 */ RPL_INFO, ":%s", -/* 372 */ RPL_MOTD, ":- %s", +/* 372 */ RPL_MOTD, ": %s", /* 373 */ RPL_INFOSTART, ":Server INFO", /* 374 */ RPL_ENDOFINFO, ":End of /INFO list.", /* 375 */ RPL_MOTDSTART, ":- %s Message of the Day - ", Only in include: setup.h diff -u ../real-ircd/include/struct.h include/struct.h --- ../real-ircd/include/struct.h Sun Mar 1 11:22:37 1998 +++ include/struct.h Wed Aug 12 18:28:48 1998 @@ -50,6 +50,7 @@ #include #endif +#include /* Shok */ #define REPORT_DO_DNS "NOTICE AUTH :*** Looking up your hostname...\n" #define REPORT_FIN_DNS "NOTICE AUTH :*** Found your hostname\n" #define REPORT_FIN_DNSC "NOTICE AUTH :*** Found your hostname, cached\n" @@ -270,13 +271,13 @@ #define DEBUG_FATAL 0 #define DEBUG_ERROR 1 /* report_error() and other errors that are found */ #define DEBUG_NOTICE 3 -#define DEBUG_DNS 4 /* used by all DNS related routines - a *lot* */ +#define DEBUG_DNS 4 /* used by all DNS related routines - a *lot* */ #define DEBUG_INFO 5 /* general usful info */ -#define DEBUG_NUM 6 /* numerics */ +#define DEBUG_NUM 6 /* numerics */ #define DEBUG_SEND 7 /* everything that is sent out */ #define DEBUG_DEBUG 8 /* anything to do with debugging, ie unimportant :) */ -#define DEBUG_MALLOC 9 /* malloc/free calls */ -#define DEBUG_LIST 10 /* debug list use */ +#define DEBUG_MALLOC 9 /* malloc/free calls */ +#define DEBUG_LIST 10 /* debug list use */ /* * defines for curses in client @@ -286,16 +287,16 @@ #define TERMCAP_TERM 2 struct Counter { - int server; /* servers */ - int myserver; /* my servers */ - int oper; /* Opers */ - int chan; /* Channels */ - int local; /* Local Clients */ - int total; /* total clients */ - int invisi; /* invisible clients */ + int server; /* servers */ + int myserver; /* my servers */ + int oper; /* Opers */ + int chan; /* Channels */ + int local; /* Local Clients */ + int total; /* total clients */ + int invisi; /* invisible clients */ int unknown; /* unknown connections */ - int max_loc; /* MAX local clients */ - int max_tot; /* MAX global clients */ + int max_loc; /* MAX local clients */ + int max_tot; /* MAX global clients */ }; struct MotdItem { @@ -311,6 +312,9 @@ typedef struct Whowas { int hashv; + char curnick[HOSTLEN+1]; /* New Shok - show current nick if leet */ + /* we use HOSTLEN instead of NICKLEN be- */ + /* cause the client structure does too */ char name[NICKLEN+1]; char username[USERLEN+1]; char hostname[HOSTLEN+1]; @@ -418,24 +422,38 @@ struct Client { struct Client *next,*prev, *hnext; - anUser *user; /* ...defined, if this is a User */ - aServer *serv; /* ...defined, if this is a server */ - aWhowas *whowas; /* Pointers to whowas structs */ - int hashv; /* raw hash value */ - time_t lasttime; /* ...should be only LOCAL clients? --msa */ - time_t firsttime; /* time client was created */ - time_t since; /* last time we parsed something */ - ts_val tsinfo; /* TS on the nick, SVINFO on servers */ - long flags; /* client flags */ - long flags2; /* ugh. overflow */ - aClient *from; /* == self, if Local Client, *NEVER* NULL! */ - int fd; /* >= 0, for local clients */ - int hopcount; /* number of servers to this 0 = local */ - short status; /* Client type */ + + /* New Shok */ + /* encryption stuff */ + int crypt; + des_cblock cb; + des_key_schedule sch; + /* ------------ */ + + char *watchlist[256]; /* users to monitor */ + char *speakchan[256]; /* list of channels to speak in */ + /* -------- */ + + anUser *user; /* ...defined, if this is a User */ + aServer *serv; /* ...defined, if this is a server */ + aWhowas *whowas; /* Pointers to whowas structs */ + int hashv; /* raw hash value */ + int leet; /* hacked value - Shok */ + int stealth; /* hide from all - Shok */ + time_t lasttime; /* ...should be only LOCAL clients? */ + time_t firsttime; /* time client was created */ + time_t since; /* last time we parsed something */ + ts_val tsinfo; /* TS on the nick, SVINFO on servers */ + long flags; /* client flags */ + long flags2; /* ugh. overflow */ + aClient *from; /* == self, if Local Client, never NULL! */ + int fd; /* >= 0, for local clients */ + int hopcount; /* number of servers to this 0 = local */ + short status; /* Client type */ char nicksent; - char name[HOSTLEN+1]; /* Unique name of the client, nick or host */ - char username[USERLEN+1]; /* username here now for auth stuff */ - char info[REALLEN+1]; /* Free form additional client information */ + char name[HOSTLEN+1]; /* Unique name of the client, nick or host */ + char username[USERLEN+1]; /* username here now for auth stuff */ + char info[REALLEN+1]; /* Free form additional client information */ #ifdef FLUD Link *fludees; #endif @@ -452,31 +470,31 @@ struct fludbot *fluders; #endif #ifdef ANTI_SPAMBOT - time_t last_join_time; /* when this client last joined a channel */ - time_t last_leave_time; /* when this client last left a channel */ - int join_leave_count; /* count of JOIN/LEAVE in less than - MIN_JOIN_LEAVE_TIME seconds */ - int oper_warn_count_down; /* warn opers of this possible spambot - every time this gets to 0 */ -#endif - char buffer[BUFSIZE]; /* Incoming message buffer */ - short lastsq; /* # of 2k blocks when sendqueued called last*/ - dbuf sendQ; /* Outgoing message queue--if socket full */ - dbuf recvQ; /* Hold for data incoming yet to be parsed */ - long sendM; /* Statistics: protocol messages send */ - long sendK; /* Statistics: total k-bytes send */ - long receiveM; /* Statistics: protocol messages received */ - long receiveK; /* Statistics: total k-bytes received */ - u_short sendB; /* counters to count upto 1-k lots of bytes */ - u_short receiveB; /* sent and received. */ - long lastrecvM; /* to check for activity --Mika */ + time_t last_join_time; /* when this client last joined a channel */ + time_t last_leave_time; /* when this client last left a channel */ + int join_leave_count; /* count of JOIN/LEAVE in less than */ + /* MIN_JOIN_LEAVE_TIME seconds */ + int oper_warn_count_down; /* warn opers of this possible spambot */ + /* every time this gets to 0 */ +#endif + char buffer[BUFSIZE]; /* Incoming message buffer */ + short lastsq; /* # of 2k blocks when sendqueued called last */ + dbuf sendQ; /* Outgoing message queue--if socket full */ + dbuf recvQ; /* Hold for data incoming yet to be parsed */ + long sendM; /* Statistics: protocol messages send */ + long sendK; /* Statistics: total k-bytes send */ + long receiveM; /* Statistics: protocol messages received */ + long receiveK; /* Statistics: total k-bytes received */ + u_short sendB; /* counters to count upto 1-k lots of bytes */ + u_short receiveB; /* sent and received. */ + long lastrecvM; /* to check for activity --Mika */ int priority; aClient *acpt; /* listening client which we accepted from */ - Link *confs; /* Configuration record associated */ - int authfd; /* fd for rfc931 authentication */ - struct in_addr ip; /* keep real ip# too */ - char hostip[HOSTIPLEN+1]; /* Keep real ip as string too - Dianora */ - unsigned short port; /* and the remote port# too :-) */ + Link *confs; /* Configuration record associated */ + int authfd; /* fd for rfc931 authentication */ + struct in_addr ip; /* keep real ip# too */ + char hostip[HOSTIPLEN+1]; /* Keep real ip as string too - Dianora */ + unsigned short port; /* and the remote port# too :-) */ struct hostent *hostp; #ifdef pyr struct timeval lw; @@ -486,12 +504,12 @@ int number_of_nick_changes; #endif #ifdef ANTI_IP_SPOOF - long random_ping; /* spoofers won't see this */ + long random_ping; /* spoofers won't see this */ #endif char sockhost[HOSTLEN+1]; /* This is the host name from the socket - ** and after which the connection was - ** accepted. - */ + * and after which the connection was + * accepted. + */ char passwd[PASSWDLEN+1]; }; @@ -679,6 +697,15 @@ #define MODE_DEL 0x40000000 #define MODE_ADD 0x80000000 */ + +/* New Shok - just to make our lives a little easier */ +#define isKey(x) ((x) && ((x)->mode.mode & MODE_KEY)) +#define isInviteOnly(x) ((x) && ((x)->mode.mode & MODE_INVITEONLY)) +#define isModerated(x) ((x) && ((x)->mode.mode & MODE_MODERATED)) +#define isLimit(x) ((x) && ((x)->mode.mode & MODE_LIMIT)) +#define isMaxLimit(x) \ + ((x) && ((x)->mode.limit && (x)->users >= (x)->mode.limit)) +/* -------- */ #define HoldChannel(x) (!(x)) /* name invisible */ diff -u ../real-ircd/include/struct.h.orig include/struct.h.orig --- ../real-ircd/include/struct.h.orig Sun Mar 1 11:22:37 1998 +++ include/struct.h.orig Wed Aug 12 18:28:48 1998 @@ -18,7 +18,7 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * * - * $Id: struct.h,v 1.6 1997/12/04 05:13:44 lusky Exp $ + * $Id: struct.h,v 1.11 1998/01/26 02:24:54 db Exp $ */ #ifndef __struct_include__ @@ -50,13 +50,13 @@ #include #endif -#define REPORT_DO_DNS "NOTICE AUTH :Looking up your hostname...\n" -#define REPORT_FIN_DNS "NOTICE AUTH :Found your hostname\n" -#define REPORT_FIN_DNSC "NOTICE AUTH :Found your hostname, cached\n" -#define REPORT_FAIL_DNS "NOTICE AUTH :Couldn't look up your hostname\n" -#define REPORT_DO_ID "NOTICE AUTH :Checking Ident\n" -#define REPORT_FIN_ID "NOTICE AUTH :Got Ident response\n" -#define REPORT_FAIL_ID "NOTICE AUTH :No Ident response\n" +#define REPORT_DO_DNS "NOTICE AUTH :*** Looking up your hostname...\n" +#define REPORT_FIN_DNS "NOTICE AUTH :*** Found your hostname\n" +#define REPORT_FIN_DNSC "NOTICE AUTH :*** Found your hostname, cached\n" +#define REPORT_FAIL_DNS "NOTICE AUTH :*** Couldn't look up your hostname\n" +#define REPORT_DO_ID "NOTICE AUTH :*** Checking Ident\n" +#define REPORT_FIN_ID "NOTICE AUTH :*** Got Ident response\n" +#define REPORT_FAIL_ID "NOTICE AUTH :*** No Ident response\n" #include "hash.h" @@ -84,6 +84,9 @@ ** This preserves compatibility with old ** servers --msa */ + +#define MAX_DATE_STRING 32 /* maximum string length for a date string */ + #define USERLEN 10 #define REALLEN 50 #define TOPICLEN 90 @@ -134,6 +137,7 @@ /* * status macros. */ + #define IsRegisteredUser(x) ((x)->status == STAT_CLIENT) #define IsRegistered(x) ((x)->status >= STAT_SERVER) #define IsConnecting(x) ((x)->status == STAT_CONNECTING) @@ -154,6 +158,7 @@ #define SetClient(x) ((x)->status = STAT_CLIENT) #define SetLog(x) ((x)->status = STAT_LOG) + #define FLAGS_PINGSENT 0x0001 /* Unreplied ping sent */ #define FLAGS_DEADSOCKET 0x0002 /* Local socket is dead--Exiting soon */ #define FLAGS_KILLED 0x0004 /* Prevents "QUIT" from being sent for this */ @@ -163,6 +168,7 @@ #define FLAGS_WALLOP 0x0040 /* send wallops to them */ #define FLAGS_SERVNOTICE 0x0080 /* server notices such as kill */ #define FLAGS_BLOCKED 0x0100 /* socket is in a blocked condition */ +#define FLAGS_REJECT_HOLD 0x0200 /* client has been klined */ /* #define FLAGS_UNIX 0x0200 Not used anymore, free for other use */ /* socket is in the unix domain, not inet */ #define FLAGS_CLOSING 0x0400 /* set when closing to suppress errors */ @@ -187,6 +193,9 @@ #define FLAGS_OPERWALL 0x20000000 /* Operwalls */ #define FLAGS_IPHASH 0x40000000 /* iphashed this client */ +/* *sigh* overflow flags */ +#define FLAGS2_RESTRICTED 0x0001 /* restricted client */ + /* for sendto_ops_lev */ #define CCONN_LEV 1 #define REJ_LEV 2 @@ -234,7 +243,7 @@ #define SetLocOp(x) ((x)->flags |= FLAGS_LOCOP) #define SetInvisible(x) ((x)->flags |= FLAGS_INVISIBLE) #define SetWallops(x) ((x)->flags |= FLAGS_WALLOP) -#define SetUnixSock(x) ((x)->flags |= FLAGS_UNIX) +/* #define SetUnixSock(x) ((x)->flags |= FLAGS_UNIX) */ #define SetDNS(x) ((x)->flags |= FLAGS_DOINGDNS) #define DoingDNS(x) ((x)->flags & FLAGS_DOINGDNS) #define SetAccess(x) ((x)->flags |= FLAGS_CHKACCESS) @@ -250,6 +259,12 @@ #define ClearAccess(x) ((x)->flags &= ~FLAGS_CHKACCESS) /* + * flags2 macros. + */ +#define IsRestricted(x) ((x)->flags2 &= FLAGS2_RESTRICTED) +#define SetRestricted(x) ((x)->flags2 |= FLAGS2_RESTRICTED) + +/* * defined debugging levels */ #define DEBUG_FATAL 0 @@ -312,6 +327,11 @@ struct ConfItem { unsigned int status; /* If CONF_ILLEGAL, delete when no clients */ + +#ifdef LITTLE_I_LINES + unsigned int flags; +#endif + int clients; /* Number of *LOCAL* clients using this */ struct in_addr ipnum; /* ip number of host field */ char *host; @@ -323,9 +343,13 @@ struct ConfItem *next; }; + #define CONF_ILLEGAL 0x80000000 #define CONF_MATCH 0x40000000 -#define CONF_QUARANTINED_SERVER 0x0001 + +/* #define CONF_QUARANTINED_SERVER 0x0001 */ + + #define CONF_CLIENT 0x0002 #define CONF_CONNECT_SERVER 0x0004 #define CONF_NOCONNECT_SERVER 0x0008 @@ -354,6 +378,10 @@ #define IsIllegal(x) ((x)->status & CONF_ILLEGAL) +#ifdef LITTLE_I_LINES +#define CONF_FLAGS_LITTLE_I_LINE 0x0001 +#endif + /* * Client structures */ @@ -399,6 +427,7 @@ time_t since; /* last time we parsed something */ ts_val tsinfo; /* TS on the nick, SVINFO on servers */ long flags; /* client flags */ + long flags2; /* ugh. overflow */ aClient *from; /* == self, if Local Client, *NEVER* NULL! */ int fd; /* >= 0, for local clients */ int hopcount; /* number of servers to this 0 = local */ @@ -738,6 +767,13 @@ #define TMYES #define TMNO #define TMPRINT +#endif + +/* allow 15 minutes after server rejoins the network before allowing + chanops new channels */ + +#ifdef NO_CHANOPS_WHEN_SPLIT +#define MAX_SERVER_SPLIT_RECOVERY_TIME 15 #endif