diff -uNrd ircd-hybrid-6rc4/ChangeLog ircd-hybrid-6-t6+ins/ChangeLog --- ircd-hybrid-6rc4/ChangeLog Thu Aug 24 20:29:15 2000 +++ ircd-hybrid-6-t6+ins/ChangeLog Sat Aug 12 20:12:14 2000 @@ -1,39 +1,3 @@ -*** 20000824_4 by lusky -- removed trailing ')' from channel +/-j oper notices - - -*** 20000824_3 by lusky -- glines were not matched properly for unidented clients - - -*** 20000824_2 by lusky -- changed Q:line behaviour for NICKs to just return ERR_ERRONEUSNICKNAME - - -*** 20000824_1 by lusky -- server_estab() - mask IP in the op notices, but log the real ip -- disable wildcards in WHOIS (configurable for now) -- DLPATH didn't get loaded on REHASH - - -*** 20000822_1 by lusky -added support for CIDR IP tklines, just like normal klines - - -*** 20000821_2 by lusky -kludge to fix an I: bug where blah.foo.com could match I:nomatch::foo.com - - -*** 20000821_1 by lusky -fix for stats by a server causing a core - - -*** 20000820_1 by lusky -first shot at fixing a really old bug with USE_POLL that would cause the - server to not parse queued commands until there was additional activity - on the descriptor. - - *** 20000812_2 by lusky yet another test commit diff -uNrd ircd-hybrid-6rc4/README.ins ircd-hybrid-6-t6+ins/README.ins --- ircd-hybrid-6rc4/README.ins Wed Dec 31 19:00:00 1969 +++ ircd-hybrid-6-t6+ins/README.ins Mon Aug 14 11:04:53 2000 @@ -0,0 +1,10 @@ +The INS patch adds the following features to hybrid: + +- define TOPIC_UH in config.h to show the nick!user@host of + the user who set the topic, instead of just the nick. +- define STATS_P_NOTICE to see /stats p requests but no + other /stats. +- if an oper has the A priv in their O line, they can set + umode +a and will be shown as server administrators. + this will propagate remotely to all servers running the + INS patch. diff -uNrd ircd-hybrid-6rc4/include/channel.h ircd-hybrid-6-t6+ins/include/channel.h --- ircd-hybrid-6rc4/include/channel.h Fri Jul 30 22:44:44 1999 +++ ircd-hybrid-6-t6+ins/include/channel.h Mon Aug 14 09:59:32 2000 @@ -54,7 +54,7 @@ struct Mode mode; char topic[TOPICLEN + 1]; #ifdef TOPIC_INFO - char topic_nick[NICKLEN + 1]; + char *topic_info; time_t topic_time; #endif int users; diff -uNrd ircd-hybrid-6rc4/include/client.h ircd-hybrid-6-t6+ins/include/client.h --- ircd-hybrid-6rc4/include/client.h Thu Jun 8 23:48:22 2000 +++ ircd-hybrid-6-t6+ins/include/client.h Mon Aug 14 10:54:06 2000 @@ -327,10 +327,11 @@ #define FLAGS_OPERWALL 0x0200 /* Operwalls */ #define FLAGS_INVISIBLE 0x0400 /* makes user invisible */ #define FLAGS_BOTS 0x0800 /* shows bots */ -#define FLAGS_EXTERNAL 0x1000 /* show servers introduced */ +#define FLAGS_EXTERNAL 0x1000 /* servers introduced and splitting */ /* user information flags, only settable by remote mode or local oper */ #define FLAGS_OPER 0x4000 /* Operator */ #define FLAGS_LOCOP 0x8000 /* Local operator -- SRB */ +#define FLAGS_ADMIN 0x10000 /* server administrator */ /* *sigh* overflow flags */ #define FLAGS2_RESTRICTED 0x0001 /* restricted client */ @@ -342,12 +343,13 @@ /* oper priv flags */ #define FLAGS2_OPER_GLOBAL_KILL 0x0020 /* oper can global kill */ #define FLAGS2_OPER_REMOTE 0x0040 /* oper can do squits/connects */ -#define FLAGS2_OPER_UNKLINE 0x0080 /* oper can use unkline */ +#define FLAGS2_OPER_UNKLINE 0x0080 /* oper can unkline and undline */ #define FLAGS2_OPER_GLINE 0x0100 /* oper can use gline */ #define FLAGS2_OPER_N 0x0200 /* oper can umode n */ #define FLAGS2_OPER_K 0x0400 /* oper can kill/kline */ #define FLAGS2_OPER_DIE 0x0800 /* oper can die */ #define FLAGS2_OPER_REHASH 0x1000 /* oper can rehash */ +#define FLAGS2_OPER_ADMIN 0x2000 /* oper is an admin */ #define FLAGS2_OPER_FLAGS (FLAGS2_OPER_GLOBAL_KILL | \ FLAGS2_OPER_REMOTE | \ FLAGS2_OPER_UNKLINE | \ @@ -355,7 +357,8 @@ FLAGS2_OPER_N | \ FLAGS2_OPER_K | \ FLAGS2_OPER_DIE | \ - FLAGS2_OPER_REHASH) + FLAGS2_OPER_REHASH | \ + FLAGS2_OPER_ADMIN) /* ZIP_LINKS */ #define FLAGS2_ZIP 0x4000 /* (server) link is zipped */ @@ -373,11 +376,11 @@ #define FLAGS2_SENDQ_POP 0x400000 /* sendq exceeded (during list) */ -#define SEND_UMODES (FLAGS_INVISIBLE | FLAGS_OPER | FLAGS_WALLOP) +#define SEND_UMODES (FLAGS_INVISIBLE | FLAGS_OPER | FLAGS_WALLOP | FLAGS_ADMIN) #define ALL_UMODES (SEND_UMODES | FLAGS_SERVNOTICE | FLAGS_CCONN | \ FLAGS_REJ | FLAGS_SKILL | FLAGS_FULL | FLAGS_SPY | \ FLAGS_NCHANGE | FLAGS_OPERWALL | FLAGS_DEBUG | \ - FLAGS_BOTS | FLAGS_EXTERNAL | FLAGS_LOCOP ) + FLAGS_BOTS | FLAGS_EXTERNAL | FLAGS_LOCOP | FLAGS_ADMIN ) #ifndef OPER_UMODES #define OPER_UMODES (FLAGS_OPER | FLAGS_WALLOP | FLAGS_SERVNOTICE | \ @@ -491,6 +494,8 @@ #define IsOperDie(x) ((x)->flags2 & FLAGS2_OPER_DIE) #define SetOperRehash(x) ((x)->flags2 |= FLAGS2_OPER_REHASH) #define IsOperRehash(x) ((x)->flags2 & FLAGS2_OPER_REHASH) +#define SetOperAdmin(x) ((x)->flags2 |= FLAGS2_OPER_ADMIN) +#define IsSetOperAdmin(x) ((x)->flags2 & FLAGS2_OPER_ADMIN) #define CBurst(x) ((x)->flags2 & FLAGS2_CBURST) /* diff -uNrd ircd-hybrid-6rc4/include/config.h ircd-hybrid-6-t6+ins/include/config.h --- ircd-hybrid-6rc4/include/config.h Thu Aug 24 02:15:50 2000 +++ ircd-hybrid-6-t6+ins/include/config.h Mon Aug 14 10:55:39 2000 @@ -16,7 +16,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * $Id: config.h,v 1.82 2000/08/24 06:15:50 lusky Exp $ + * $Id: config.h,v 1.81 2000/06/26 22:38:40 lusky Exp $ */ #ifndef INCLUDED_config_h #define INCLUDED_config_h @@ -107,8 +107,8 @@ * */ -#define DPATH "/usr/local/ircd/" -#define SPATH "/usr/local/ircd/ircd" +#define DPATH "/home/ejb/ircd/" +#define SPATH "/home/ejb/ircd/ircd" #define CPATH "ircd.conf" #define KPATH "kline.conf" #define DLPATH "kline.conf" @@ -287,7 +287,16 @@ * Members of the development team were split on supporting the * default here. */ -#define STATS_NOTICE +#undef STATS_NOTICE + +/* + * STATS_P_NOTICE + * + * If you don't like stats_notice, but still want your opers + * to be able to respond to /stats p, then define this. + */ + +#define STATS_P_NOTICE /* WHOIS_NOTICE - Shows a notice to an oper when a user does a * /whois on them @@ -301,11 +310,6 @@ */ #define WHOIS_WAIT 1 -/* NO_WHOIS_WILDCARDS - disable the use of wildcards in WHOIS. - * this will probably be permanently enabled in the next release. - */ -#define NO_WHOIS_WILDCARDS - /* PACE_WAIT - minimum seconds between use of MOTD, INFO, HELP, LINKS, TRACE * -Dianora */ @@ -904,6 +908,14 @@ */ #define USE_RCS +/* + * TOPIC_UH - ircnet style topic info + * if this is defined then the topic will show the n!u@h of the person + * who set the topic, not just the nick + */ + +#define TOPIC_UH + /* ----------------- not approved on EFnet section -------------------- */ /* GLINES - global Kline-like bans * Define this if you want GLINE support @@ -918,6 +930,13 @@ * As configured here, a GLINE will last 12 hours */ #define GLINE_TIME (12*3600) + +/* GLINE_STRICT_VOTE - Define this if you want your server to + * be strict about opers voting more than once for G-Lines. + * Recommended if you don't like opers with multiple G flags + * triggering G-lines. + */ +#define GLINE_STRICT_VOTE /* ----------------- archaic and/or broken section -------------------- */ #undef DNS_DEBUG diff -uNrd ircd-hybrid-6rc4/include/config.h.dist ircd-hybrid-6-t6+ins/include/config.h.dist --- ircd-hybrid-6rc4/include/config.h.dist Thu Aug 24 02:15:51 2000 +++ ircd-hybrid-6-t6+ins/include/config.h.dist Mon Aug 14 09:52:49 2000 @@ -16,7 +16,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * $Id: config.h.dist,v 1.73 2000/08/24 06:15:51 lusky Exp $ + * $Id: config.h.dist,v 1.72 2000/06/26 22:38:40 lusky Exp $ */ #ifndef INCLUDED_config_h #define INCLUDED_config_h @@ -301,11 +301,6 @@ */ #define WHOIS_WAIT 1 -/* NO_WHOIS_WILDCARDS - disable the use of wildcards in WHOIS. - * this will probably be permanently enabled in the next release. - */ -#define NO_WHOIS_WILDCARDS - /* PACE_WAIT - minimum seconds between use of MOTD, INFO, HELP, LINKS, TRACE * -Dianora */ @@ -918,6 +913,13 @@ * As configured here, a GLINE will last 12 hours */ #define GLINE_TIME (12*3600) + +/* GLINE_STRICT_VOTE - Define this if you want your server to + * be strict about opers voting more than once for G-Lines. + * Recommended if you don't like opers with multiple G flags + * triggering G-lines. + */ +#define GLINE_STRICT_VOTE /* ----------------- archaic and/or broken section -------------------- */ #undef DNS_DEBUG diff -uNrd ircd-hybrid-6rc4/include/m_commands.h ircd-hybrid-6-t6+ins/include/m_commands.h --- ircd-hybrid-6rc4/include/m_commands.h Fri Jul 30 22:44:44 1999 +++ ircd-hybrid-6-t6+ins/include/m_commands.h Mon Aug 14 09:52:49 2000 @@ -33,8 +33,10 @@ extern int m_kline(struct Client *,struct Client *,int,char **); extern int m_unkline(struct Client *,struct Client *,int,char **); extern int m_dline(struct Client *,struct Client *,int,char **); +extern int m_undline(struct Client *,struct Client *,int,char **); extern int m_gline(struct Client *,struct Client *,int,char **); +extern int m_ungline(struct Client *,struct Client *,int,char **); extern int m_locops(struct Client *,struct Client *,int,char **); diff -uNrd ircd-hybrid-6rc4/include/m_gline.h ircd-hybrid-6-t6+ins/include/m_gline.h --- ircd-hybrid-6rc4/include/m_gline.h Thu Aug 24 20:20:41 2000 +++ ircd-hybrid-6-t6+ins/include/m_gline.h Mon Aug 14 09:52:49 2000 @@ -19,7 +19,7 @@ * * "m_gline.h". - Headers file. * - * $Id: m_gline.h,v 1.4 2000/08/25 00:20:41 lusky Exp $ + * $Id: m_gline.h,v 1.3 1999/07/30 06:48:10 tomh Exp $ * */ @@ -40,10 +40,11 @@ struct ConfItem; #ifdef GLINES -extern struct ConfItem* find_gkill(struct Client *, char *); -extern struct ConfItem* find_is_glined(const char *, const char *); +extern struct ConfItem* find_gkill(struct Client* client); +extern struct ConfItem* find_is_glined(const char* host, const char* name); extern void flush_glines(void); extern void report_glines(struct Client *); +extern int remove_gline_match(const char* user, const char* host); typedef struct gline_pending { diff -uNrd ircd-hybrid-6rc4/include/m_info.h ircd-hybrid-6-t6+ins/include/m_info.h --- ircd-hybrid-6rc4/include/m_info.h Thu Jul 22 23:06:14 1999 +++ ircd-hybrid-6-t6+ins/include/m_info.h Mon Aug 14 09:52:49 2000 @@ -215,6 +215,12 @@ { "F_LINES_OPER_ONLY", "OFF", 0, "Allow only Operators to use STATS F" }, #endif /* F_LINES_OPER_ONLY */ +#ifdef GLINE_STRICT_VOTE + { "GLINE_STRICT_VOTE", "ON", 0, "Prevent opers voting twice on Glines" }, +#else + { "GLINE_STRICT_VOTE", "OFF", 0, "Prevent opers voting twice on Glines" }, +#endif /* GLINE_STRICT_VOTE */ + #ifdef GLINE_TIME { "GLINE_TIME", "", GLINE_TIME, "Expire Time for Glines" }, #else @@ -548,12 +554,6 @@ { "TS_MAX_DELTA", "", TS_MAX_DELTA, "Maximum Allowed TS Delta from another Server" }, { "TS_WARN_DELTA", "", TS_WARN_DELTA, "Maximum TS Delta before Sending Warning" }, - -#ifdef USE_IP_I_LINE_FIRST - { "USE_IP_I_LINE_FIRST", "ON", 0, "Search IP Ilines First" }, -#else - { "USE_IP_I_LINE_FIRST", "OFF", 0, "Search IP Ilines First" }, -#endif /* USE_IP_I_LINE_FIRST */ #ifdef USE_RCS { "USE_RCS", "ON", 0, "Use \"ci\" to Keep RCS Control" }, diff -uNrd ircd-hybrid-6rc4/include/msg.h ircd-hybrid-6-t6+ins/include/msg.h --- ircd-hybrid-6rc4/include/msg.h Fri Jun 9 22:45:36 2000 +++ ircd-hybrid-6-t6+ins/include/msg.h Mon Aug 14 09:52:49 2000 @@ -115,11 +115,12 @@ #define MSG_KLINE "KLINE" /* KLINE */ #define MSG_UNKLINE "UNKLINE" /* UNKLINE */ #define MSG_DLINE "DLINE" /* DLINE */ +#define MSG_UNDLINE "UNDLINE" /* UNDLINE */ #define MSG_HTM "HTM" /* HTM */ #define MSG_SET "SET" /* SET */ #define MSG_GLINE "GLINE" /* GLINE */ - +#define MSG_UNGLINE "UNGLINE" /* UNGLINE */ #define MSG_LOCOPS "LOCOPS" /* LOCOPS */ #ifdef LWALLOPS @@ -238,7 +239,9 @@ { MSG_KLINE, m_kline, 0, MAXPARA, 1, 0, 0, 0L }, { MSG_UNKLINE, m_unkline, 0, MAXPARA, 1, 0, 0, 0L }, { MSG_DLINE, m_dline, 0, MAXPARA, 1, 0, 0, 0L }, + { MSG_UNDLINE, m_undline, 0, MAXPARA, 1, 0, 0, 0L }, { MSG_GLINE, m_gline, 0, MAXPARA, 1, 0, 0, 0L }, + { MSG_UNGLINE, m_ungline, 0, MAXPARA, 1, 0, 0, 0L }, { MSG_HASH, m_hash, 0, MAXPARA, 1, 0, 0, 0L }, { MSG_DNS, m_dns, 0, MAXPARA, 1, 0, 0, 0L }, { MSG_REHASH, m_rehash, 0, MAXPARA, 1, 0, 0, 0L }, diff -uNrd ircd-hybrid-6rc4/include/numeric.h ircd-hybrid-6-t6+ins/include/numeric.h --- ircd-hybrid-6rc4/include/numeric.h Thu Dec 23 02:10:51 1999 +++ ircd-hybrid-6-t6+ins/include/numeric.h Mon Aug 14 10:48:04 2000 @@ -280,6 +280,7 @@ #define RPL_ENDOFUSERS 394 #define RPL_NOUSERS 395 +#define RPL_WHOISADMIN 399 /* * Errors are in the range from 400-599 currently and are grouped by what * commands they come from. diff -uNrd ircd-hybrid-6rc4/include/patchlevel.h ircd-hybrid-6-t6+ins/include/patchlevel.h --- ircd-hybrid-6rc4/include/patchlevel.h Wed Aug 9 18:50:23 2000 +++ ircd-hybrid-6-t6+ins/include/patchlevel.h Mon Aug 14 09:53:06 2000 @@ -17,5 +17,5 @@ */ #ifndef PATCHLEVEL -#define PATCHLEVEL "2.8/hybrid-6rc4" +#define PATCHLEVEL "2.8/hybrid-6rc4-t6+ins" #endif diff -uNrd ircd-hybrid-6rc4/include/s_conf.h ircd-hybrid-6-t6+ins/include/s_conf.h --- ircd-hybrid-6rc4/include/s_conf.h Tue Aug 22 01:03:55 2000 +++ ircd-hybrid-6-t6+ins/include/s_conf.h Mon Aug 14 10:20:58 2000 @@ -21,12 +21,9 @@ */ /* - * $Id: s_conf.h,v 1.44 2000/08/22 05:03:55 lusky Exp $ + * $Id: s_conf.h,v 1.43 1999/08/10 03:32:14 lusky Exp $ * * $Log: s_conf.h,v $ - * Revision 1.44 2000/08/22 05:03:55 lusky - * added support for CIDR IP tklines, just like normal klines - * * Revision 1.43 1999/08/10 03:32:14 lusky * remove check from configure, assume exists (sw) * cleaned up attach_Iline some more (db) @@ -322,6 +319,7 @@ #define CONF_OPER_K 32 #define CONF_OPER_REHASH 64 #define CONF_OPER_DIE 128 +#define CONF_OPER_ADMIN 256 typedef struct { @@ -350,7 +348,6 @@ extern struct ConfItem* ConfigItemList; /* GLOBAL - conf list head */ extern int specific_virtual_host; /* GLOBAL - used in s_bsd.c */ extern struct ConfItem *temporary_klines; -extern struct ConfItem *temporary_ip_klines; extern ConfigFileEntryType ConfigFileEntry; /* GLOBAL - defined in ircd.c */ extern void clear_ip_hash_table(void); @@ -429,7 +426,6 @@ extern void add_temp_kline(struct ConfItem *); extern void flush_temp_klines(void); extern void report_temp_klines(struct Client *); -extern void show_temp_klines(struct Client *, struct ConfItem *); extern int is_address(char *,unsigned long *,unsigned long *); extern int rehash (struct Client *, struct Client *, int); diff -uNrd ircd-hybrid-6rc4/include/serno.h ircd-hybrid-6-t6+ins/include/serno.h --- ircd-hybrid-6rc4/include/serno.h Thu Aug 24 20:29:14 2000 +++ ircd-hybrid-6-t6+ins/include/serno.h Sat Aug 12 20:12:13 2000 @@ -1 +1 @@ -#define SERIALNUM "20000824_4" +#define SERIALNUM "20000812_2" diff -uNrd ircd-hybrid-6rc4/opers.txt ircd-hybrid-6-t6+ins/opers.txt --- ircd-hybrid-6rc4/opers.txt Fri Jun 9 22:45:34 2000 +++ ircd-hybrid-6-t6+ins/opers.txt Mon Aug 14 09:52:49 2000 @@ -23,7 +23,7 @@ * +d - Can see server debug messages. * +n - Can see client nick changes. * +b - Can see possible bot warnings. - * +x - Can see new server introduction messages. + * +x - Can see server introduction and split messages. =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= @@ -188,6 +188,9 @@ In order to use rather than , must be on your server. ++ UNDLINE - UNDLINE + Will attempt to undline the given + + HTM - HTM [option] When no [option] is given, HTM shows the current High Traffic Mode rate and whether HTM is on or off. @@ -251,6 +254,12 @@ It takes three different opers on three different servers to do the same GLINE within a short interval, to have a GLINE triggered for a compiled time of hours. + ++ UNGLINE - UNGLINE + -- if compiled with GLINE -- + Will attempt to remove gline matching + This will only remove the gline from YOUR server, it + does not try to remove it globally. + TESTLINE - TESTLINE |ip -- Looks up given user@host or user@ip diff -uNrd ircd-hybrid-6rc4/src/channel.c ircd-hybrid-6-t6+ins/src/channel.c --- ircd-hybrid-6rc4/src/channel.c Thu Aug 24 20:29:11 2000 +++ ircd-hybrid-6-t6+ins/src/channel.c Mon Aug 14 11:06:15 2000 @@ -34,7 +34,7 @@ * mode * -p etc. if flag was clear * * - * $Id: channel.c,v 1.178 2000/08/25 00:29:11 lusky Exp $ + * $Id: channel.c,v 1.177 2000/04/21 23:39:25 lusky Exp $ */ #include "channel.h" #include "client.h" @@ -871,7 +871,7 @@ } else if (*parabuf) send = 1; - if (count == 3) + if (count == MAXMODEPARAMS) send = 1; if (send) { @@ -881,7 +881,7 @@ *parabuf = '\0'; cp = modebuf; *cp++ = '+'; - if (count != 3) + if (count != MAXMODEPARAMS) { (void)strcpy(parabuf, name); *cp++ = flag; @@ -1903,14 +1903,14 @@ if (whatt == MODE_ADD) { chptr->mode.mode |= MODE_JUPED; - sendto_realops("%s!%s@%s juping locally Channel %s", + sendto_realops("%s!%s@%s juping locally Channel %s)", sptr->name, sptr->username, sptr->host, chptr->chname); } else if(whatt == MODE_DEL) { chptr->mode.mode &= ~MODE_JUPED; - sendto_realops("%s!%s@%s unjuping locally Channel %s", + sendto_realops("%s!%s@%s unjuping locally Channel %s)", sptr->name, sptr->username, sptr->host, chptr->chname); } @@ -2288,7 +2288,7 @@ "User %s (%s@%s) is attemping to join locally juped channel %s", sptr->name, sptr->username, sptr->host,chptr->chname); - return (ERR_BADCHANNAME); + return (ERR_UNAVAILRESOURCE); } #endif @@ -3306,7 +3306,7 @@ #ifdef TOPIC_INFO sendto_one(sptr, form_str(RPL_TOPICWHOTIME), me.name, parv[0], name, - chptr->topic_nick, + chptr->topic_info, chptr->topic_time); #endif } @@ -3788,12 +3788,23 @@ * chptr zeroed */ strncpy_irc(chptr->topic, topic, TOPICLEN); + + if (chptr->topic_info) + free(chptr->topic_info); + #ifdef TOPIC_INFO - /* - * XXX - this truncates the topic_nick if - * strlen(sptr->name) > NICKLEN - */ - strncpy_irc(chptr->topic_nick, sptr->name, NICKLEN); +#ifdef TOPIC_UH /* INS */ + chptr->topic_info = + (char *)MyMalloc(strlen(sptr->name)+ + strlen(sptr->username)+ + strlen(sptr->host)+3); + ircsprintf(chptr->topic_info, "%s!%s@%s", + sptr->name, sptr->username, sptr->host); +#else + chptr->topic_info = + (char *)MyMalloc(strlen(sptr->name) + 1); + strncpy_irc(chptr->topic_info, sptr->name, NICKLEN); +#endif chptr->topic_time = CurrentTime; #endif sendto_match_servs(chptr, cptr,":%s TOPIC %s :%s", @@ -3820,7 +3831,7 @@ #ifdef TOPIC_INFO sendto_one(sptr, form_str(RPL_TOPICWHOTIME), me.name, parv[0], chptr->chname, - chptr->topic_nick, + chptr->topic_info, chptr->topic_time); #endif } diff -uNrd ircd-hybrid-6rc4/src/client.c ircd-hybrid-6-t6+ins/src/client.c --- ircd-hybrid-6rc4/src/client.c Thu Aug 24 20:20:45 2000 +++ ircd-hybrid-6-t6+ins/src/client.c Mon Aug 14 09:52:49 2000 @@ -20,7 +20,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * $Id: client.c,v 1.55 2000/08/25 00:20:45 lusky Exp $ + * $Id: client.c,v 1.53 2000/05/26 03:57:39 lusky Exp $ */ #include "client.h" #include "class.h" @@ -310,54 +310,48 @@ { if(dline_in_progress) { - if( (aconf = match_Dline(ntohl(cptr->ip.s_addr))) ) - - /* if there is a returned - * struct ConfItem then kill it - */ + if(IsPerson(cptr)) { - if(IsConfElined(aconf)) + if( (aconf = match_Dline(ntohl(cptr->ip.s_addr))) ) + + /* if there is a returned + * struct ConfItem then kill it + */ { - sendto_realops("D-line over-ruled for %s client is E-lined", - get_client_name(cptr,FALSE)); - continue; - continue; - } + if(IsConfElined(aconf)) + { + sendto_realops("D-line over-ruled for %s client is E-lined", + get_client_name(cptr,FALSE)); + continue; + continue; + } - sendto_realops("D-line active for %s", + sendto_realops("D-line active for %s", get_client_name(cptr, FALSE)); - dying_clients[die_index] = cptr; + dying_clients[die_index] = cptr; /* Wintrhawk */ #ifdef KLINE_WITH_CONNECTION_CLOSED - /* - * We use a generic non-descript message here on - * purpose so as to prevent other users seeing the - * client disconnect from harassing the IRCops - */ - reason = "Connection closed"; + /* + * We use a generic non-descript message here on + * purpose so as to prevent other users seeing the + * client disconnect from harassing the IRCops + */ + reason = "Connection closed"; #else #ifdef KLINE_WITH_REASON - reason = aconf->passwd ? aconf->passwd : "D-lined"; + reason = aconf->passwd ? aconf->passwd : "D-lined"; #else - reason = "D-lined"; + reason = "D-lined"; #endif /* KLINE_WITH_REASON */ #endif /* KLINE_WITH_CONNECTION_CLOSED */ - dying_clients_reason[die_index++] = reason; - dying_clients[die_index] = (struct Client *)NULL; - if(IsPerson(cptr)) - { + dying_clients_reason[die_index++] = reason; + dying_clients[die_index] = (struct Client *)NULL; sendto_one(cptr, form_str(ERR_YOUREBANNEDCREEP), me.name, cptr->name, reason); + continue; /* and go examine next fd/cptr */ } -#ifdef REPORT_DLINE_TO_USER - else - { - sendto_one(cptr, "NOTICE DLINE :*** You have been D-lined"); - } -#endif - continue; /* and go examine next fd/cptr */ } } else @@ -365,7 +359,7 @@ if(IsPerson(cptr)) { #ifdef GLINES - if( (aconf = find_gkill(cptr,cptr->username)) ) + if( (aconf = find_gkill(cptr)) ) { if(IsElined(cptr)) { @@ -527,6 +521,8 @@ { sendto_ops("No response from %s, closing link", get_client_name(cptr, FALSE)); + log(L_NOTICE, "No response from %s, closing link", + get_client_name(cptr, FALSE)); } /* * this is used for KILL lines with time restrictions @@ -670,6 +666,9 @@ if (IsServer(cptr)) { --Count.server; + + sendto_realops_flags(FLAGS_EXTERNAL, "Server %s split from %s", + cptr->name, cptr->servptr->name); #ifdef NEED_SPLITCODE /* Don't bother checking for a split, if split code diff -uNrd ircd-hybrid-6rc4/src/m_gline.c ircd-hybrid-6-t6+ins/src/m_gline.c --- ircd-hybrid-6rc4/src/m_gline.c Thu Aug 24 20:20:46 2000 +++ ircd-hybrid-6-t6+ins/src/m_gline.c Mon Aug 14 09:52:49 2000 @@ -20,7 +20,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * $Id: m_gline.c,v 1.40 2000/08/25 00:20:46 lusky Exp $ + * $Id: m_gline.c,v 1.39 2000/08/10 04:40:16 lusky Exp $ */ #include "m_gline.h" #include "channel.h" @@ -495,10 +495,10 @@ * side effects - none */ -aConfItem *find_gkill(aClient* cptr, char* username) +aConfItem *find_gkill(aClient* cptr) { assert(0 != cptr); - return (IsElined(cptr)) ? 0 : find_is_glined(cptr->host, username); + return (IsElined(cptr)) ? 0 : find_is_glined(cptr->host, cptr->username); } /* @@ -681,6 +681,58 @@ } /* + * remove_gline_match + * + * inputs - user@host + * output - 1 if successfully removed, otherwise 0 + * side effects - + */ +int remove_gline_match(const char* user, const char* host) +{ + aConfItem *kill_list_ptr; /* used for the link list only */ + aConfItem *last_list_ptr; + aConfItem *tmp_list_ptr; + + if(glines) + { + kill_list_ptr = last_list_ptr = glines; + + while(kill_list_ptr) + { + if(!irccmp(kill_list_ptr->host,host) && + !irccmp(kill_list_ptr->name,user)) /* this gline matches */ + { + if(glines == kill_list_ptr) + { + /* Its pointing to first one in link list*/ + /* so, bypass this one, remember bad things can happen + if you try to use an already freed pointer.. */ + + glines = last_list_ptr = tmp_list_ptr = + kill_list_ptr->next; + } + else + { + /* its in the middle of the list, so link around it */ + tmp_list_ptr = last_list_ptr->next = kill_list_ptr->next; + } + free_conf(kill_list_ptr); + kill_list_ptr = tmp_list_ptr; + return 1; + } + else + { + last_list_ptr = kill_list_ptr; + kill_list_ptr = kill_list_ptr->next; + } + } + return 0; + } + else + return 0; +} + +/* * expire_pending_glines * * inputs - NONE @@ -805,7 +857,11 @@ if( (irccmp(gline_pending_ptr->user,user) == 0) && (irccmp(gline_pending_ptr->host,host) ==0 ) ) { +#ifdef GLINE_STRICT_VOTE + if(((irccmp(gline_pending_ptr->oper_user1,oper_user) == 0) || +#else if(((irccmp(gline_pending_ptr->oper_user1,oper_user) == 0) && +#endif (irccmp(gline_pending_ptr->oper_host1,oper_host) == 0)) || (irccmp(gline_pending_ptr->oper_server1,oper_server) == 0) ) { @@ -817,8 +873,11 @@ if(gline_pending_ptr->oper_user2[0] != '\0') { /* if two other opers on two different servers have voted yes */ - +#ifdef GLINE_STRICT_VOTE + if(((irccmp(gline_pending_ptr->oper_user2,oper_user)==0) || +#else if(((irccmp(gline_pending_ptr->oper_user2,oper_user)==0) && +#endif (irccmp(gline_pending_ptr->oper_host2,oper_host)==0)) || (irccmp(gline_pending_ptr->oper_server2,oper_server)==0)) { diff -uNrd ircd-hybrid-6rc4/src/m_kline.c ircd-hybrid-6-t6+ins/src/m_kline.c --- ircd-hybrid-6rc4/src/m_kline.c Tue Aug 22 01:03:59 2000 +++ ircd-hybrid-6-t6+ins/src/m_kline.c Fri Jun 9 22:45:36 2000 @@ -20,7 +20,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * $Id: m_kline.c,v 1.55 2000/08/22 05:03:59 lusky Exp $ + * $Id: m_kline.c,v 1.54 2000/06/10 02:45:36 lusky Exp $ */ #include "m_kline.h" #include "channel.h" @@ -662,8 +662,12 @@ ** */ + /* + * what to do if host is a legal ip, and its a temporary kline ? + * Don't do the CIDR conversion for now of course. + */ - if((ip_kline = is_address(host, &ip, &ip_mask))) + if(!temporary_kline_time && (ip_kline = is_address(host, &ip, &ip_mask))) { /* * XXX - ack @@ -726,11 +730,6 @@ current_date); DupString(aconf->passwd, buffer ); aconf->hold = CurrentTime + temporary_kline_time_seconds; - if(ip_kline) - { - aconf->ip = ip; - aconf->ip_mask = ip_mask; - } add_temp_kline(aconf); rehashed = YES; dline_in_progress = NO; diff -uNrd ircd-hybrid-6rc4/src/m_server.c ircd-hybrid-6-t6+ins/src/m_server.c --- ircd-hybrid-6rc4/src/m_server.c Wed Jul 19 23:58:23 2000 +++ ircd-hybrid-6-t6+ins/src/m_server.c Mon Aug 14 09:52:49 2000 @@ -36,6 +36,7 @@ #include "scache.h" /* find_or_add */ #include "send.h" /* sendto_one */ #include "struct.h" /* bleah */ +#include "s_log.h" #include #include @@ -258,6 +259,8 @@ { sendto_ops("Link %s cancelled, server %s already exists", get_client_name(bcptr, TRUE), host); + log(L_NOTICE, "Link %s cancelled, server %s already exists", + get_client_name(bcptr, TRUE), host); return exit_client(bcptr, bcptr, &me, "Server Exists"); } /* @@ -273,6 +276,8 @@ strcpy(nbuf, get_client_name(bcptr, TRUE)); sendto_ops("Link %s cancelled, server %s reintroduced by %s", nbuf, host, get_client_name(cptr, TRUE)); + log(L_NOTICE, "Link %s cancelled, server %s reintroduced by %s", + nbuf, host, get_client_name(cptr, TRUE)); exit_client(bcptr, bcptr, &me, "Server Exists"); } @@ -294,6 +299,8 @@ sendto_one(cptr,"ERROR :Nickname %s already exists!", host); sendto_ops("Link %s cancelled: Server/nick collision on %s", /* inpath */ get_client_name(cptr,FALSE), host); + log(L_NOTICE, "Link %s cancelled: Server/nick collision on %s", + /* inpath */ get_client_name(cptr,FALSE), host); return exit_client(cptr, cptr, cptr, "Nick as Server"); } diff -uNrd ircd-hybrid-6rc4/src/m_squit.c ircd-hybrid-6-t6+ins/src/m_squit.c --- ircd-hybrid-6rc4/src/m_squit.c Sat Jul 31 04:23:00 1999 +++ ircd-hybrid-6-t6+ins/src/m_squit.c Mon Aug 14 09:52:49 2000 @@ -227,9 +227,12 @@ log(L_TRACE, "SQUIT From %s : %s (%s)", parv[0], server, comment); } else if (MyConnect(acptr)) - sendto_ops("Received SQUIT %s from %s (%s)", - acptr->name, get_client_name(sptr,FALSE), comment); - + { + sendto_ops("Received SQUIT %s from %s (%s)", + acptr->name, get_client_name(sptr,FALSE), comment); + log(L_NOTICE, "Received SQUIT %s from %s (%s)", + acptr->name, get_client_name(sptr,FALSE), comment); + } return exit_client(cptr, acptr, sptr, comment); } diff -uNrd ircd-hybrid-6rc4/src/m_stats.c ircd-hybrid-6-t6+ins/src/m_stats.c --- ircd-hybrid-6rc4/src/m_stats.c Mon Aug 21 21:55:49 2000 +++ ircd-hybrid-6-t6+ins/src/m_stats.c Mon Aug 14 10:57:11 2000 @@ -20,7 +20,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * $Id: m_stats.c,v 1.4 2000/08/22 01:55:49 lusky Exp $ + * $Id: m_stats.c,v 1.3 2000/06/07 03:23:14 lusky Exp $ */ #include "m_commands.h" /* m_pass prototype */ #include "class.h" /* report_classes */ @@ -138,11 +138,6 @@ char* name; static time_t last_used = 0; - if(!IsClient(sptr)) - { - return 0; - } - if(!IsAnOper(sptr)) { if((last_used + PACE_WAIT) > CurrentTime) @@ -444,6 +439,14 @@ "STATS %c requested by %s (%s@%s) [%s]", stat, sptr->name, sptr->username, sptr->host, sptr->user->server); +#else +#ifdef STATS_P_NOTICE + if (valid_stats && stat == 'p') + sendto_realops_flags(FLAGS_SPY, + "STATS p requested by %s (%s@%s) [%s]", + sptr->name, sptr->username, sptr->host, + sptr->user->server); +#endif #endif return 0; } diff -uNrd ircd-hybrid-6rc4/src/m_svinfo.c ircd-hybrid-6-t6+ins/src/m_svinfo.c --- ircd-hybrid-6rc4/src/m_svinfo.c Wed Aug 11 23:02:20 1999 +++ ircd-hybrid-6-t6+ins/src/m_svinfo.c Mon Aug 14 09:52:49 2000 @@ -29,6 +29,7 @@ #include "ircd.h" #include "numeric.h" #include "send.h" +#include "s_log.h" #include #include @@ -132,6 +133,9 @@ if (deltat > TS_MAX_DELTA) { sendto_ops( + "Link %s dropped, excessive TS delta (my TS=%d, their TS=%d, delta=%d)", + get_client_name(sptr, TRUE), CurrentTime, theirtime,deltat); + log(L_NOTICE, "Link %s dropped, excessive TS delta (my TS=%d, their TS=%d, delta=%d)", get_client_name(sptr, TRUE), CurrentTime, theirtime,deltat); return exit_client(sptr, sptr, sptr, "Excessive TS delta"); diff -uNrd ircd-hybrid-6rc4/src/m_unkline.c ircd-hybrid-6-t6+ins/src/m_unkline.c --- ircd-hybrid-6rc4/src/m_unkline.c Thu Aug 24 02:15:56 2000 +++ ircd-hybrid-6-t6+ins/src/m_unkline.c Mon Aug 14 09:52:49 2000 @@ -21,8 +21,11 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * * - * $Id: m_unkline.c,v 1.38 2000/08/24 06:15:56 lusky Exp $ + * $Id: m_unkline.c,v 1.37 2000/06/10 02:45:36 lusky Exp $ */ +#ifdef GLINES +#include "m_gline.h" +#endif #include "m_commands.h" #include "channel.h" #include "client.h" @@ -197,7 +200,6 @@ me.name, parv[0]); sendto_one(sptr, ":%s NOTICE %s :Couldn't find host", me.name, parv[0]); - log(L_ERROR, "K-Line file corrupted (couldn't find host)"); if(!error_on_write) error_on_write = flush_write(sptr, out, buf, temppath); continue; /* This K line is corrupted ignore */ @@ -213,7 +215,6 @@ me.name, parv[0]); sendto_one(sptr, ":%s NOTICE %s :Couldn't find comment", me.name, parv[0]); - log(L_ERROR, "K-Line file corrupted (couldn't find comment)"); if(!error_on_write) error_on_write = flush_write(sptr, out, buf, temppath); continue; /* This K line is corrupted ignore */ @@ -405,4 +406,298 @@ } } return NO; +} + +/* +** m_undline +** added May 28th 2000 by Toby Verrall +** based totally on m_unkline +** +** parv[0] = sender nick +** parv[1] = dline to remove +*/ +int m_undline (aClient *cptr,aClient *sptr,int parc,char *parv[]) +{ + FBFILE* in; + FBFILE* out; + int pairme = NO; + char buf[BUFSIZE]; + char buff[BUFSIZE]; /* matches line definition in s_conf.c */ + char temppath[256]; + + const char *filename; /* filename to use for undline */ + + char *cidr; + char *p; + unsigned long ip_host; + unsigned long ip_mask; + int error_on_write = NO; + mode_t oldumask; + + ircsprintf(temppath, "%s.tmp", ConfigFileEntry.dlinefile); + + if (check_registered(sptr)) + { + return -1; + } + + if (!IsAnOper(sptr)) + { + sendto_one(sptr, form_str(ERR_NOPRIVILEGES), me.name, + parv[0]); + return 0; + } + + if (!IsSetOperUnkline(sptr)) + { + sendto_one(sptr,":%s NOTICE %s :You have no U flag",me.name, + parv[0]); + return 0; + } + + if ( parc < 2 ) + { + sendto_one(sptr, form_str(ERR_NEEDMOREPARAMS), + me.name, parv[0], "UNDLINE"); + return 0; + } + + cidr = parv[1]; + + if (!is_address(cidr,&ip_host,&ip_mask)) + { + sendto_one(sptr, ":%s NOTICE %s :Invalid parameters", + me.name, parv[0]); + return 0; + } + + filename = get_conf_name(DLINE_TYPE); + + if( (in = fbopen(filename, "r")) == 0) + { + sendto_one(sptr, ":%s NOTICE %s :Cannot open %s", + me.name,parv[0],filename); + return 0; + } + + oldumask = umask(0); /* ircd is normally too paranoid */ + if( (out = fbopen(temppath, "w")) == 0) + { + sendto_one(sptr, ":%s NOTICE %s :Cannot open %s", + me.name,parv[0],temppath); + fbclose(in); + umask(oldumask); /* Restore the old umask */ + return 0; + } + umask(oldumask); /* Restore the old umask */ + + +/* +#toot!~toot@127.0.0.1 D'd: 123.4.5.0/24:test (2000/05/28 12.48) +D:123.4.5.0/24:test (2000/05/28 12.48) +*/ + + while(fbgets(buf, sizeof(buf), in)) + { + if((buf[1] == ':') && ((buf[0] == 'd') || (buf[0] == 'D'))) + { + /* its a D: line */ + char *found_cidr; + + strncpy_irc(buff, buf, BUFSIZE); /* extra paranoia */ + + p = strchr(buff,'\n'); + if(p) + *p = '\0'; + + found_cidr = buff + 2; /* point past the D: */ + p = strchr(found_cidr,':'); + if(p == (char *)NULL) + { + sendto_one(sptr, ":%s NOTICE %s :D-Line file corrupted", + me.name, parv[0]); + sendto_one(sptr, ":%s NOTICE %s :Couldn't find CIDR", + me.name, parv[0]); + if(!error_on_write) + error_on_write = flush_write(sptr, out, buf, temppath); + continue; /* This D line is corrupted ignore */ + } + *p = '\0'; + + if(irccmp(cidr,found_cidr)) + { + if(!error_on_write) + error_on_write = flush_write(sptr, out, buf, temppath); + } + else + pairme++; + + } + else if(buf[0] == '#') + { + char *found_cidr; + + strncpy_irc(buff, buf, BUFSIZE); + +/* +#toot!~toot@127.0.0.1 D'd: 123.4.5.0/24:test (2000/05/28 12.48) +D:123.4.5.0/24:test (2000/05/28 12.48) + +If its a comment coment line, i.e. +#ignore this line +Then just ignore the line +*/ + + p = strchr(buff,':'); + if(p == (char *)NULL) + { + if(!error_on_write) + error_on_write = flush_write(sptr, out, buf, temppath); + continue; + } + *p = '\0'; + p++; + + found_cidr = p; + p = strchr(found_cidr,':'); + + if(p == (char *)NULL) + { + if(!error_on_write) + error_on_write = flush_write(sptr, out, buf, temppath); + continue; + } + *p = '\0'; + + while(*found_cidr == ' ') + found_cidr++; + + + if( (irccmp(found_cidr,cidr))) + { + if(!error_on_write) + error_on_write = flush_write(sptr, out, buf, temppath); + } + } + + else /* its the ircd.conf file, and not a D line or comment */ + { + if(!error_on_write) + error_on_write = flush_write(sptr, out, buf, temppath); + } + } + + fbclose(in); + + + if(!error_on_write) + { + fbclose(out); + (void)rename(temppath, filename); + rehash(cptr,sptr,0); + } + else + { + sendto_one(sptr,":%s NOTICE %s :Couldn't write D-line file, aborted", + me.name,parv[0]); + return -1; + } + + if(!pairme) + { + sendto_one(sptr, ":%s NOTICE %s :No D-Line for %s", + me.name, parv[0],cidr); + return 0; + } + + sendto_one(sptr, ":%s NOTICE %s :D-Line for [%s] is removed", + me.name, parv[0], cidr); + sendto_ops("%s has removed the D-Line for: [%s]", + parv[0], cidr); + + log(L_NOTICE, "%s removed D-Line for [%s]", parv[0], cidr); + return 0; +} + +/* +** m_ungline +** added May 29th 2000 by Toby Verrall +** +** parv[0] = sender nick +** parv[1] = gline to remove +*/ + +int m_ungline (aClient *cptr,aClient *sptr,int parc,char *parv[]) +{ +#ifdef GLINES + + char *user,*host; + + if (check_registered(sptr)) + { + return -1; + } + + if (!IsOper(sptr)) + { + sendto_one(sptr, form_str(ERR_NOPRIVILEGES), me.name, + parv[0]); + return 0; + } + + if (!IsSetOperUnkline(sptr) || !IsSetOperGline(sptr)) + { + sendto_one(sptr,":%s NOTICE %s :You have no U and G flag", + me.name,parv[0]); + return 0; + } + + if ( parc < 2 ) + { + sendto_one(sptr, form_str(ERR_NEEDMOREPARAMS), + me.name, parv[0], "UNGLINE"); + return 0; + } + + if ( (host = strchr(parv[1], '@')) || *parv[1] == '*' ) + { + /* Explicit user@host mask given */ + + if(host) /* Found user@host */ + { + user = parv[1]; /* here is user part */ + *(host++) = '\0'; /* and now here is host */ + } + else + { + user = "*"; /* no @ found, assume its *@somehost */ + host = parv[1]; + } + } + else + { + sendto_one(sptr, ":%s NOTICE %s :Invalid parameters", + me.name, parv[0]); + return 0; + } + + if(remove_gline_match(user, host)) + { + sendto_one(sptr, ":%s NOTICE %s :Un-glined [%s@%s]", + me.name, parv[0],user, host); + sendto_ops("%s has removed the G-Line for: [%s@%s]", + parv[0], user, host ); + log(L_NOTICE, "%s removed G-Line for [%s@%s]", + parv[0], user, host); + return 0; + } + else + { + sendto_one(sptr, ":%s NOTICE %s :No G-Line for %s@%s", + me.name, parv[0],user,host); + return 0; + } +#else + sendto_one(sptr,":%s NOTICE %s :UNGLINE disabled",me.name,parv[0]); +#endif } diff -uNrd ircd-hybrid-6rc4/src/m_whois.c ircd-hybrid-6-t6+ins/src/m_whois.c --- ircd-hybrid-6rc4/src/m_whois.c Thu Aug 24 02:15:56 2000 +++ ircd-hybrid-6-t6+ins/src/m_whois.c Mon Aug 14 10:52:02 2000 @@ -20,7 +20,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * $Id: m_whois.c,v 1.3 2000/08/24 06:15:56 lusky Exp $ + * $Id: m_whois.c,v 1.2 1999/08/10 23:07:22 lusky Exp $ */ #include "m_commands.h" @@ -181,16 +181,8 @@ ** We're no longer allowing remote users to generate ** requests with wildcards. */ -#ifdef NO_WHOIS_WILDCARDS - if (wilds) -#else if (!MyConnect(sptr) && wilds) -#endif - { - sendto_one(sptr, form_str(ERR_NOSUCHNICK), - me.name, parv[0], nick); - return 0; - } + return 0; /* continue; */ /* If the nick doesn't have any wild cards in it, @@ -275,6 +267,11 @@ if (IsAnOper(acptr)) sendto_one(sptr, form_str(RPL_WHOISOPERATOR), me.name, parv[0], name); + + if (acptr->umodes & FLAGS_ADMIN) + sendto_one(sptr, form_str(RPL_WHOISADMIN), + me.name, parv[0], name); + #ifdef WHOIS_NOTICE if ((MyOper(acptr)) && ((acptr)->umodes & FLAGS_SPY) && (MyConnect(sptr)) && (IsPerson(sptr)) && (acptr != sptr)) diff -uNrd ircd-hybrid-6rc4/src/match.c ircd-hybrid-6-t6+ins/src/match.c --- ircd-hybrid-6rc4/src/match.c Sat Sep 4 16:21:13 1999 +++ ircd-hybrid-6-t6+ins/src/match.c Mon Aug 14 09:52:49 2000 @@ -327,7 +327,7 @@ /* + */ PRINT_C|CHAN_C|NONEOS_C, /* , */ PRINT_C|NONEOS_C, /* - */ PRINT_C|NICK_C|CHAN_C|NONEOS_C|USER_C|HOST_C, -/* . */ PRINT_C|KWILD_C|CHAN_C|NONEOS_C|HOST_C|SERV_C, +/* . */ PRINT_C|KWILD_C|CHAN_C|NONEOS_C|USER_C|HOST_C|SERV_C, #ifdef RFC1035_ANAL /* / */ PRINT_C|CHAN_C|NONEOS_C, #else diff -uNrd ircd-hybrid-6rc4/src/messages.tab ircd-hybrid-6-t6+ins/src/messages.tab --- ircd-hybrid-6rc4/src/messages.tab Fri Jun 9 22:45:36 2000 +++ ircd-hybrid-6-t6+ins/src/messages.tab Mon Aug 14 10:47:42 2000 @@ -438,7 +438,7 @@ /* 396 */ (char *)NULL, /* 397 */ (char *)NULL, /* 398 */ (char *)NULL, -/* 399 */ (char *)NULL, +/* 399 RPL_WHOISADMIN */ ":%s 399 %s %s :is a Server Administrator", /* 400 */ (char *)NULL, /* 401 ERR_NOSUCHNICK, */ ":%s 401 %s %s :No such nick/channel", /* 402 ERR_NOSUCHSERVER, */ ":%s 402 %s %s :No such server", diff -uNrd ircd-hybrid-6rc4/src/messages_cust.tab ircd-hybrid-6-t6+ins/src/messages_cust.tab --- ircd-hybrid-6rc4/src/messages_cust.tab Fri Jun 9 22:45:36 2000 +++ ircd-hybrid-6-t6+ins/src/messages_cust.tab Mon Aug 14 10:48:58 2000 @@ -266,7 +266,7 @@ /* 239 */ (char *)NULL, /* 240 */ (char *)NULL, /* 241 RPL_STATSLLINE, */ ":%s 241 %s %c %s * %s %d %d", -/* 242 RPL_STATSUPTIME,*/ ":%s 242 %s :Dianora hasn't messed with the server code now in %d days, %d:%02d:%02d", +/* 242 RPL_STATSUPTIME,*/ ":%s 242 %s :Server Up %d days, %d:%02d:%02d", /* 243 RPL_STATSOLINE, */ ":%s 243 %s %c %s@%s * %s %s %d %s", /* 244 RPL_STATSHLINE, */ ":%s 244 %s %c %s * %s %d %d", /* 245 RPL_STATSSLINE, */ ":%s 245 %s %c %s * %s %d %d", @@ -439,7 +439,7 @@ /* 396 */ (char *)NULL, /* 397 */ (char *)NULL, /* 398 */ (char *)NULL, -/* 399 */ (char *)NULL, +/* 399 RPL_WHOISADMIN */ ":%s 399 %s %s :is a server administrator", /* 400 */ (char *)NULL, /* 401 ERR_NOSUCHNICK, */ ":%s 401 %s %s :No such nick/channel", /* 402 ERR_NOSUCHSERVER, */ ":%s 402 %s %s :No such server", diff -uNrd ircd-hybrid-6rc4/src/mtrie_conf.c ircd-hybrid-6-t6+ins/src/mtrie_conf.c --- ircd-hybrid-6rc4/src/mtrie_conf.c Mon Aug 21 23:34:41 2000 +++ ircd-hybrid-6-t6+ins/src/mtrie_conf.c Mon Jun 26 18:38:42 2000 @@ -43,7 +43,7 @@ * * Diane Bruce -db (db@db.net) * - * $Id: mtrie_conf.c,v 1.69 2000/08/22 03:34:41 lusky Exp $ + * $Id: mtrie_conf.c,v 1.68 2000/06/26 22:38:42 lusky Exp $ */ #include "mtrie_conf.h" #include "class.h" @@ -894,10 +894,7 @@ else { if((aconf = find_user_piece(cur_piece,flags,cur_dns_piece,user))) - { - if (match(aconf->host,host)) - return(aconf); - } + return(aconf); if((aconf = find_wild_host_piece(cur_level,flags,cur_dns_piece,user))) return(aconf); return(last_found_iline_aconf); diff -uNrd ircd-hybrid-6rc4/src/s_bsd.c ircd-hybrid-6-t6+ins/src/s_bsd.c --- ircd-hybrid-6rc4/src/s_bsd.c Sun Aug 20 02:11:49 2000 +++ ircd-hybrid-6-t6+ins/src/s_bsd.c Mon Aug 14 09:52:49 2000 @@ -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: s_bsd.c,v 1.125 2000/08/20 06:11:49 lusky Exp $ + * $Id: s_bsd.c,v 1.124 2000/06/10 02:45:37 lusky Exp $ */ #include "s_bsd.h" #include "class.h" @@ -189,7 +189,10 @@ connect_server(aconf, 0, reply); } else - sendto_ops("Connect to %s failed: host lookup", aconf->host); + { + sendto_ops("Connect to %s failed: host lookup", aconf->host); + log(L_NOTICE, "Connect to %s failed: host lookup", aconf->host); + } } /* @@ -917,8 +920,12 @@ int connected = CurrentTime - cptr->firsttime; if (0 == error) - sendto_ops("Server %s closed the connection", - get_client_name(cptr, FALSE)); + { + sendto_ops("Server %s closed the connection", + get_client_name(cptr, FALSE)); + log(L_NOTICE, "Server %s closed the connection", + get_client_name(cptr, FALSE)); + } else report_error("Lost connection to %s:%s", get_client_name(cptr, TRUE), current_error); @@ -1337,8 +1344,11 @@ */ pfd = &poll_fdarray[++i]; - for ( ; (i < nbr_pfds); i++, pfd++) + for ( ; (nfds > 0) && (i < nbr_pfds); i++, pfd++) { + if (!pfd->revents) + continue; + --nfds; fd = pfd->fd; rr = pfd->revents & POLLREADFLAGS; rw = pfd->revents & POLLWRITEFLAGS; diff -uNrd ircd-hybrid-6rc4/src/s_conf.c ircd-hybrid-6-t6+ins/src/s_conf.c --- ircd-hybrid-6rc4/src/s_conf.c Thu Aug 24 20:20:46 2000 +++ ircd-hybrid-6-t6+ins/src/s_conf.c Mon Aug 14 10:32:11 2000 @@ -19,7 +19,7 @@ * * (C) 1988 University of Oulu,Computing Center and Jarkko Oikarinen" * - * $Id: s_conf.c,v 1.187 2000/08/25 00:20:46 lusky Exp $ + * $Id: s_conf.c,v 1.184 2000/07/20 03:58:23 lusky Exp $ */ #include "s_conf.h" #include "channel.h" @@ -84,10 +84,9 @@ static void add_q_line(struct ConfItem *); static void clear_q_lines(void); static void clear_special_conf(struct ConfItem **); -static struct ConfItem* find_tkline(const char*, const char*, unsigned long); +static struct ConfItem* find_tkline(const char* host, const char* name); struct ConfItem *temporary_klines = NULL; -struct ConfItem *temporary_ip_klines = NULL; static char *set_conf_flags(struct ConfItem *,char *); static int oper_privs_from_string(int,char *); @@ -97,7 +96,7 @@ extern void outofmemory(void); /* defined in list.c */ #ifdef GLINES -extern struct ConfItem *find_gkill(aClient *,char *); /* defined in m_gline.c */ +extern struct ConfItem *find_gkill(aClient *); /* defined in m_gline.c */ #endif /* usually, with hash tables, you use a prime number... @@ -399,7 +398,7 @@ ntohl(cptr->ip.s_addr)); if(aconf && !IsConfElined(aconf)) { - if( (tkline_conf = find_tkline(cptr->host, cptr->username, ntohl(cptr->ip.s_addr))) ) + if( (tkline_conf = find_tkline(cptr->host, cptr->username)) ) aconf = tkline_conf; } } @@ -412,7 +411,7 @@ ntohl(cptr->ip.s_addr)); if(aconf && !IsConfElined(aconf)) { - if( (tkline_conf = find_tkline(cptr->host, non_ident, ntohl(cptr->ip.s_addr))) ) + if( (tkline_conf = find_tkline(cptr->host, non_ident)) ) aconf = tkline_conf; } } @@ -422,19 +421,12 @@ if (aconf->status & CONF_CLIENT) { #ifdef GLINES - if ( !IsConfElined(aconf) ) + if ( !IsConfElined(aconf) && (gkill_conf = find_gkill(cptr)) ) { - if (IsGotId(cptr)) - gkill_conf = find_gkill(cptr,cptr->username); - else - gkill_conf = find_gkill(cptr,non_ident); - if (gkill_conf) - { - *preason = gkill_conf->passwd; - sendto_one(cptr, ":%s NOTICE %s :*** G-lined", - me.name,cptr->name); - return ( -5 ); - } + *preason = gkill_conf->passwd; + sendto_one(cptr, ":%s NOTICE %s :*** G-lined", + me.name,cptr->name); + return ( -5 ); } #endif /* GLINES */ @@ -2545,10 +2537,10 @@ { nextinclude = include_list->next; if ((file = openconf(include_list->name)) == 0) - sendto_realops("Can't open %s include file",include_list->name); + sendto_ops("Can't open %s include file",include_list->name); else { - sendto_realops("Hashing in %s include file",include_list->name); + sendto_ops("Hashing in %s include file",include_list->name); initconf(file, NO); } free_conf(include_list); @@ -2647,7 +2639,7 @@ * thats expected to be done by caller.... *sigh* -Dianora */ -static struct ConfItem* find_tkline(const char* host, const char* user, unsigned long ip) +static struct ConfItem* find_tkline(const char* host, const char* user) { struct ConfItem *kill_list_ptr; /* used for the link list only */ struct ConfItem *last_list_ptr; @@ -2688,41 +2680,6 @@ } } - if(temporary_ip_klines) - { - kill_list_ptr = last_list_ptr = temporary_ip_klines; - - while(kill_list_ptr) - { - if(kill_list_ptr->hold <= CurrentTime) /* a kline has expired */ - { - if(temporary_ip_klines == kill_list_ptr) - { - temporary_ip_klines = last_list_ptr = tmp_list_ptr = - kill_list_ptr->next; - } - else - { - /* its in the middle of the list, so link around it */ - tmp_list_ptr = last_list_ptr->next = kill_list_ptr->next; - } - - free_conf(kill_list_ptr); - kill_list_ptr = tmp_list_ptr; - } - else - { - if( (kill_list_ptr->user - && (!user || match(kill_list_ptr->user, user))) - && (kill_list_ptr->ip - && ((ip & kill_list_ptr->ip_mask) == kill_list_ptr->ip))) - return(kill_list_ptr); - last_list_ptr = kill_list_ptr; - kill_list_ptr = kill_list_ptr->next; - } - } - } - return NULL; } @@ -2743,7 +2700,7 @@ { struct ConfItem *found_aconf; - if( (found_aconf = find_tkline(host, name, ntohl(ip))) ) + if( (found_aconf = find_tkline(host, name)) ) return(found_aconf); /* find_matching_mtrie_conf() can return either CONF_KILL, @@ -2768,16 +2725,8 @@ void add_temp_kline(struct ConfItem *aconf) { - if (aconf->ip == 0) - { - aconf->next = temporary_klines; - temporary_klines = aconf; - } - else - { - aconf->next = temporary_ip_klines; - temporary_ip_klines = aconf; - } + aconf->next = temporary_klines; + temporary_klines = aconf; } /* flush_temp_klines @@ -2800,16 +2749,6 @@ kill_list_ptr = temporary_klines; } } - - if( (kill_list_ptr = temporary_ip_klines) ) - { - while(kill_list_ptr) - { - temporary_ip_klines = kill_list_ptr->next; - free_conf(kill_list_ptr); - kill_list_ptr = temporary_ip_klines; - } - } } /* report_temp_klines @@ -2821,23 +2760,6 @@ */ void report_temp_klines(aClient *sptr) { - - if(temporary_klines) - show_temp_klines(sptr, temporary_klines); - if(temporary_ip_klines) - show_temp_klines(sptr, temporary_ip_klines); - -} - -/* show_temp_klines - * - * inputs - aClient pointer, client to report to - * - ConfItem pointer, the tkline list to show - * outputs - NONE - * side effects - NONE - */ -void show_temp_klines(aClient *sptr, struct ConfItem * tklist) -{ struct ConfItem *kill_list_ptr; struct ConfItem *last_list_ptr; struct ConfItem *tmp_list_ptr; @@ -2846,62 +2768,66 @@ char *reason; char *p; - kill_list_ptr = last_list_ptr = tklist; - - while(kill_list_ptr) + if(temporary_klines) { - if(kill_list_ptr->hold <= CurrentTime) /* kline has expired */ + kill_list_ptr = last_list_ptr = temporary_klines; + + while(kill_list_ptr) { - if(tklist == kill_list_ptr) + if(kill_list_ptr->hold <= CurrentTime) /* kline has expired */ { - /* Its pointing to first one in link list*/ - /* so, bypass this one, remember bad things can happen - if you try to use an already freed pointer.. */ + if(temporary_klines == kill_list_ptr) + { + /* Its pointing to first one in link list*/ + /* so, bypass this one, remember bad things can happen + if you try to use an already freed pointer.. */ - tklist = last_list_ptr = tmp_list_ptr = kill_list_ptr->next; + temporary_klines = last_list_ptr = tmp_list_ptr = + kill_list_ptr->next; + } + else + { + /* its in the middle of the list, so link around it */ + tmp_list_ptr = last_list_ptr->next = kill_list_ptr->next; + } + + free_conf(kill_list_ptr); + kill_list_ptr = tmp_list_ptr; } else { - /* its in the middle of the list, so link around it */ - tmp_list_ptr = last_list_ptr->next = kill_list_ptr->next; - } + if(kill_list_ptr->host) + host = kill_list_ptr->host; + else + host = "*"; - free_conf(kill_list_ptr); - kill_list_ptr = tmp_list_ptr; - } - else - { - if(kill_list_ptr->host) - host = kill_list_ptr->host; - else - host = "*"; + if(kill_list_ptr->user) + user = kill_list_ptr->user; + else + user = "*"; - if(kill_list_ptr->user) - user = kill_list_ptr->user; - else - user = "*"; + if(kill_list_ptr->passwd) + reason = kill_list_ptr->passwd; + else + reason = "No Reason"; - if(kill_list_ptr->passwd) - reason = kill_list_ptr->passwd; - else - reason = "No Reason"; + if(!IsAnOper(sptr)) + { + if( (p = strchr(reason,'|')) ) + *p = '\0'; - if(!IsAnOper(sptr)) - { - if( (p = strchr(reason,'|')) ) - *p = '\0'; + sendto_one(sptr,form_str(RPL_STATSKLINE), me.name, + sptr->name, 'k' , host, user, reason); + if(p) + *p = '|'; + } + else + sendto_one(sptr,form_str(RPL_STATSKLINE), me.name, + sptr->name, 'k' , host, user, reason); - sendto_one(sptr,form_str(RPL_STATSKLINE), me.name, - sptr->name, 'k' , host, user, reason); - if(p) - *p = '|'; + last_list_ptr = kill_list_ptr; + kill_list_ptr = kill_list_ptr->next; } - else - sendto_one(sptr,form_str(RPL_STATSKLINE), me.name, - sptr->name, 'k' , host, user, reason); - - last_list_ptr = kill_list_ptr; - kill_list_ptr = kill_list_ptr->next; } } } @@ -2953,6 +2879,10 @@ int_privs |= CONF_OPER_DIE; /* allow die */ else if(*privs == 'd') int_privs &= ~CONF_OPER_DIE; /* disallow die */ + else if(*privs == 'A') + int_privs |= CONF_OPER_ADMIN; /* allow umode +a */ + else if(*privs == 'a') + int_privs &= ~CONF_OPER_ADMIN; privs++; } return(int_privs); @@ -3045,6 +2975,15 @@ else *privs_ptr++ = 'd'; + if(port & CONF_OPER_ADMIN) + { + if(cptr) + SetOperAdmin(cptr); + *privs_ptr++ = 'A'; + } + else + *privs_ptr++ = 'a'; + *privs_ptr = '\0'; return(privs_out); @@ -3085,6 +3024,8 @@ int_flags |= FLAGS_DEBUG; else if(*flags == 'n') int_flags |= FLAGS_NCHANGE; + else if(*flags == 'a') + int_flags |= FLAGS_ADMIN; flags++; } @@ -3128,6 +3069,8 @@ *flags_ptr++ = 'd'; if(flags & FLAGS_NCHANGE) *flags_ptr++ = 'n'; + if(flags & FLAGS_ADMIN) + *flags_ptr++ = 'a'; *flags_ptr = '\0'; return(flags_out); @@ -3384,7 +3327,7 @@ port, get_conf_class(aconf)); - aconf = find_tkline(given_host,given_name,0); + aconf = find_tkline(given_host,given_name); if(aconf) { sendto_one(sptr, @@ -3447,7 +3390,7 @@ void read_conf_files(int cold) { FBFILE* file = 0; /* initconf */ - const char *filename,*kfilename,*dfilename; /* conf filenames */ + const char *filename; /* kline or conf filename */ filename = get_conf_name(CONF_TYPE); @@ -3460,7 +3403,7 @@ } else { - sendto_realops("Can't open %s file aborting rehash!", filename ); + sendto_ops("Can't open %s file aborting rehash!", filename ); return; } } @@ -3477,44 +3420,24 @@ * or *filename == '\0'; and then just ignoring it */ - kfilename = get_conf_name(KLINE_TYPE); - if (irccmp(filename,kfilename) != 0) +#ifdef KPATH + filename = get_conf_name(KLINE_TYPE); + + if ((file = openconf(filename)) == 0) { - if ((file = openconf(kfilename)) == 0) + if(cold) { - if(cold) - { - log(L_ERROR,"Failed reading kline file %s", kfilename); - } - else - { - sendto_realops("Can't open %s file klines could be missing!", - kfilename); - } + log(L_ERROR,"Failed reading kline file %s", filename); } else - initconf(file, NO); - } - - dfilename = get_conf_name(DLINE_TYPE); - if ((irccmp(filename,dfilename) != 0) && (irccmp(kfilename,dfilename) !=0)) - { - if ((file = openconf(dfilename)) == 0) { - if(cold) - { - log(L_ERROR,"Failed reading dline file %s", dfilename); - } - else - { - sendto_realops("Can't open %s file dlines could be missing!", - dfilename); - } + sendto_ops("Can't open %s file klines could be missing!", + filename); } - else - initconf(file, NO); } - + else + initconf(file, NO); +#endif } /* diff -uNrd ircd-hybrid-6rc4/src/s_serv.c ircd-hybrid-6-t6+ins/src/s_serv.c --- ircd-hybrid-6rc4/src/s_serv.c Thu Aug 24 02:15:57 2000 +++ ircd-hybrid-6-t6+ins/src/s_serv.c Mon Aug 14 09:52:49 2000 @@ -19,7 +19,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * $Id: s_serv.c,v 1.211 2000/08/24 06:15:57 lusky Exp $ + * $Id: s_serv.c,v 1.210 2000/04/02 13:59:01 lusky Exp $ */ #include "s_serv.h" #include "channel.h" @@ -36,13 +36,13 @@ #include "struct.h" #include "s_bsd.h" #include "s_conf.h" -#include "s_log.h" #include "s_stats.h" #include "s_user.h" #include "s_zip.h" #include "scache.h" #include "send.h" #include "s_debug.h" +#include "s_log.h" #include #include @@ -512,7 +512,6 @@ struct ConfItem* n_conf; struct ConfItem* c_conf; const char* inpath; - static char inpath_ip[HOSTLEN * 2 + USERLEN + 5]; char* host; char* encr; int split; @@ -520,9 +519,7 @@ assert(0 != cptr); ClearAccess(cptr); - strcpy(inpath_ip, get_client_name(cptr, SHOW_IP)); - inpath = get_client_name(cptr, MASK_IP); /* "refresh" inpath with host */ - + inpath = get_client_name(cptr, TRUE); /* "refresh" inpath with host */ split = irccmp(cptr->name, cptr->host); host = cptr->name; @@ -530,9 +527,9 @@ { ServerStats->is_ref++; sendto_one(cptr, - "ERROR :Access denied. No N line for server %s", inpath_ip); + "ERROR :Access denied. No N line for server %s", inpath); sendto_ops("Access denied. No N line for server %s", inpath); - log(L_NOTICE, "Access denied. No N line for server %s", inpath_ip); + log(L_NOTICE, "Access denied. No N line for server %s", inpath); return exit_client(cptr, cptr, cptr, "No N line for server"); } if (!(c_conf = find_conf_name(cptr->confs, host, CONF_CONNECT_SERVER ))) @@ -540,7 +537,7 @@ ServerStats->is_ref++; sendto_one(cptr, "ERROR :Only N (no C) field for server %s", inpath); sendto_ops("Only N (no C) field for server %s",inpath); - log(L_NOTICE, "Only N (no C) field for server %s",inpath_ip); + log(L_NOTICE, "Only N (no C) field for server %s",inpath); return exit_client(cptr, cptr, cptr, "No C line for server"); } @@ -564,7 +561,7 @@ sendto_one(cptr, "ERROR :No Access (passwd mismatch) %s", inpath); sendto_ops("Access denied (passwd mismatch) %s", inpath); - log(L_NOTICE, "Access denied (passwd mismatch) %s", inpath_ip); + log(L_NOTICE, "Access denied (passwd mismatch) %s", inpath); return exit_client(cptr, cptr, cptr, "Bad Password"); } memset((void *)cptr->passwd, 0,sizeof(cptr->passwd)); @@ -608,6 +605,9 @@ sendto_ops("Username mismatch [%s]v[%s] : %s", n_conf->user, cptr->username, get_client_name(cptr, TRUE)); + log(L_NOTICE, "Username mismatch [%s]v[%s] : %s", + n_conf->user, cptr->username, + get_client_name(cptr, TRUE)); sendto_one(cptr, "ERROR :No Username Match"); return exit_client(cptr, cptr, cptr, "Bad User"); } @@ -622,6 +622,8 @@ zip_free(cptr); sendto_ops("Unable to setup compressed link for %s", get_client_name(cptr, TRUE)); + log(L_NOTICE, "Unable to setup compressed link for %s", + get_client_name(cptr, TRUE)); return exit_client(cptr, cptr, &me, "zip_init() failed"); } cptr->flags2 |= (FLAGS2_ZIP|FLAGS2_ZIPFIRST); @@ -671,7 +673,7 @@ sendto_ops("Link with %s established: (%s) link", inpath,show_capabilities(cptr)); log(L_NOTICE, "Link with %s established: (%s) link", - inpath_ip,show_capabilities(cptr)); + inpath,show_capabilities(cptr)); add_to_client_hash_table(cptr->name, cptr); /* doesnt duplicate cptr->serv if allocated this struct already */ diff -uNrd ircd-hybrid-6rc4/src/s_user.c ircd-hybrid-6-t6+ins/src/s_user.c --- ircd-hybrid-6rc4/src/s_user.c Thu Aug 24 19:28:07 2000 +++ ircd-hybrid-6-t6+ins/src/s_user.c Mon Aug 14 10:30:11 2000 @@ -20,7 +20,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * $Id: s_user.c,v 1.223 2000/08/24 23:28:07 lusky Exp $ + * $Id: s_user.c,v 1.222 2000/06/26 23:07:32 lusky Exp $ */ #include "s_user.h" #include "channel.h" @@ -78,6 +78,7 @@ static FLAG_ITEM user_modes[] = { + {FLAGS_ADMIN, 'a'}, {FLAGS_BOTS, 'b'}, {FLAGS_CCONN, 'c'}, {FLAGS_DEBUG, 'd'}, @@ -133,7 +134,7 @@ 0, /* Z 0x5A */ 0, 0, 0, 0, 0, /* 0x5F */ /* 0x60 */ 0, - 0, /* a */ + FLAGS_ADMIN, /* a */ FLAGS_BOTS, /* b */ FLAGS_CCONN, /* c */ FLAGS_DEBUG, /* d */ @@ -757,7 +758,18 @@ reason, get_client_name(cptr, FALSE)); } - } + + if((find_q_line(nick, sptr->username, sptr->host))) + { + sendto_realops_flags(FLAGS_REJ, + "Quarantined nick [%s], dumping user %s", + nick,get_client_name(cptr, FALSE)); + + ServerStats->is_ref++; + return exit_client(cptr, sptr, &me, "quarantined nick"); + } + } + sendto_realops_flags(FLAGS_CCONN, "Client connecting: %s (%s@%s) [%s] {%d}", @@ -1398,14 +1410,12 @@ return 0; } - if(MyConnect(sptr) && !IsServer(sptr) && !IsAnOper(sptr) && + if(MyConnect(sptr) && !IsServer(sptr) && + !IsAnOper(sptr) && sptr->user && find_q_line(nick, sptr->username, sptr->host)) { - sendto_realops_flags(FLAGS_REJ, - "Quarantined nick [%s] from user %s", - nick,get_client_name(cptr, FALSE)); - sendto_one(sptr, form_str(ERR_ERRONEUSNICKNAME), - me.name, parv[0], parv[1]); + sendto_one(sptr, form_str(ERR_UNAVAILRESOURCE), + me.name, BadPtr(parv[0]) ? "*" : parv[0], nick); return 0; } @@ -2047,6 +2057,13 @@ sendto_one(sptr,":%s NOTICE %s :*** You need oper and N flag for +n", me.name,parv[0]); sptr->umodes &= ~FLAGS_NCHANGE; /* only tcm's really need this */ + } + + if ((sptr->umodes & FLAGS_ADMIN) && !IsSetOperAdmin(sptr)) + { + sendto_one(sptr,":%s NOTICE %s :*** You need oper and A flag for +a", + me.name,parv[0]); + sptr->umodes &= ~FLAGS_ADMIN; } if (!(setflags & FLAGS_INVISIBLE) && IsInvisible(sptr)) diff -uNrd ircd-hybrid-6rc4/src/test/reference/CVS/Entries ircd-hybrid-6-t6+ins/src/test/reference/CVS/Entries --- ircd-hybrid-6rc4/src/test/reference/CVS/Entries Wed Dec 31 19:00:00 1969 +++ ircd-hybrid-6-t6+ins/src/test/reference/CVS/Entries Mon Aug 14 09:50:42 2000 @@ -0,0 +1,4 @@ +/match_t.0/1.1/Thu Jun 24 07:38:21 1999// +/match_t.ref/1.1/Thu Jun 24 07:38:22 1999// +/strncpy_t.ref/1.1/Sun Jul 18 03:58:34 1999// +D diff -uNrd ircd-hybrid-6rc4/src/test/reference/CVS/Repository ircd-hybrid-6-t6+ins/src/test/reference/CVS/Repository --- ircd-hybrid-6rc4/src/test/reference/CVS/Repository Wed Dec 31 19:00:00 1969 +++ ircd-hybrid-6-t6+ins/src/test/reference/CVS/Repository Mon Aug 14 09:50:42 2000 @@ -0,0 +1 @@ +ircd-hybrid-6/src/test/reference diff -uNrd ircd-hybrid-6rc4/src/test/reference/CVS/Root ircd-hybrid-6-t6+ins/src/test/reference/CVS/Root --- ircd-hybrid-6rc4/src/test/reference/CVS/Root Wed Dec 31 19:00:00 1969 +++ ircd-hybrid-6-t6+ins/src/test/reference/CVS/Root Mon Aug 14 09:50:42 2000 @@ -0,0 +1 @@ +ejb@hybridcvs.ircd-hybrid.org:/cvsroot diff -uNrd ircd-hybrid-6rc4/src/version.c ircd-hybrid-6-t6+ins/src/version.c --- ircd-hybrid-6rc4/src/version.c Wed Dec 31 19:00:00 1969 +++ ircd-hybrid-6-t6+ins/src/version.c Mon Aug 14 11:06:34 2000 @@ -0,0 +1,95 @@ +/* + * IRC - Internet Relay Chat, src/version.c + * Copyright (C) 1990 Chelsea Ashley Dyerman + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 1, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +/* + * This file is generated by version.c.SH. Any changes made will go away. + */ + +#include "struct.h" +#include "patchlevel.h" +#include "serno.h" + +char *generation = "6"; +char *creation = "Mon Aug 14 2000 at 15:06:34 GMT"; +char *version = PATCHLEVEL; +char *serno = SERIALNUM; + +char *infotext[] = +{ + "IRC --", + "Based on the original code written by Jarkko Oikarinen", + "Copyright 1988, 1989, 1990, 1991 University of Oulu, Computing Center", + "", + "This program is free software; you can redistribute it and/or", + "modify it under the terms of the GNU General Public License as", + "published by the Free Software Foundation; either version 1, or", + "(at your option) any later version.", + "", + "The core Hybrid Team as of this major release:", + "", + "Bleep Thomas Helvey tomh@inxpress.net", + "cosine Patrick Alken wnder@uwns.underworld.net", + "Dianora Diane Bruce db@db.net", + "Neph|l|m Adel Mezibra adel@cybercable.fr", + "Rodder Jon Lusky lusky@blown.net", + "", + "The following people have contributed to this release of hybrid", + "in nick alphabetical order:", + "", + "CBongo Chris Bongaarts cab@tc.umn.edu", + "comstud Chris Behrens cbehrens@concentric.net", + "Dianora Diane Bruce db@db.net", + "echo Adam J. Durana adam@caca.com", + "FlashMan Craig A. Huegen chuegen@quadrunner.com", + "jailbird Dustin Marquess jailbird@alcatraz.fdf.net", + "johan Johannes Erdfelt jerdfelt@eng.mindspring.net", + "LarZ Matthew Ramsey mjr@blackened.com", + "orabidoo Roger Espel Llima espel@unix.bigots.org", + "Seaner Sean McVeigh sdlmcvei@uwaterloo.ca", + "Shadowfax Michael Pearce mpearce@varner.com", + "Slowaris Ryan Parker rjp@wpmedia.com", + "ThemBones Brian Kraemer kraemer@u.washington.edu", + "White_Dragon Chip Norkus wd@dal.net", + "WintrHawk Jake Khuon khuon@GCtr.Net", + "Wohali Joan Touzet jolo@cadence.com", + "", + "", + "Developers and Contributors for previous versions:", + "", + "Chris Portman Keith Fralick Jon Mischo", + "Sam Noble Taner Halicioglu Darren Reed", + "Markku Savela Greg Lindahl Jarkko Oikarinen", + "Armin Gruner Matthew Green Chuck Kane", + "Matt Lyle Vesa Ruokonen Nicolas PIOCH", + "Stellan Klebom Dan Goodwin Mike Bolotski", + "Ian Frechette Markku Jarvinen Kimmo Suominen", + "Jeff Trim Vijay Subramaniam Karl Kleinpaste", + "Bill Wisner Tom Davis Hugo Calendar", + "Tom Hopkins Stephen van den Berg", + "Bo Adler Michael Sandrof Jon Solomon", + "Jan Peterson Helen Rose Paul Graham", + "", + "Thanks also goes to those persons not mentioned here who have added", + "their advice, opinions, and code to IRC.", + "Thanks also to those who provide the kind sys admins who let me and", + "others continue to develop IRC.", + "", + "Compiled on [Linux styx 2.2.14 #5 Mon Jan 31 06:09:17 GMT 2000 i586 unknown]", + 0, +};