# $Id: ircd-hybrid-6.0+jcs.diff,v 1.1 2001/08/21 20:06:07 jcs Exp $ # # Opers can join any channel and op themselves # # by Joshua Stein # diff -ur ircd-hybrid-6.0/include/config.h ircd-hybrid-6.0+jcs/include/config.h --- ircd-hybrid-6.0/include/config.h Sun Nov 26 22:11:47 2000 +++ ircd-hybrid-6.0+jcs/include/config.h Thu May 10 12:01:05 2001 @@ -599,7 +599,7 @@ * the net. for a leaf, 2 is fine. If the number of servers seen * on the net gets less than 2, a split is deemed to have happened. */ -#define SPLIT_SMALLNET_SIZE 2 +#define SPLIT_SMALLNET_SIZE 0 /* * SPLIT_SMALLNET_USER_SIZE defines how many global users on the @@ -609,7 +609,7 @@ * number of users seen on net > SPLIT_SMALLNET_USER_SIZE start * counting down the SERVER_SPLIT_RECOVERY_TIME */ -#define SPLIT_SMALLNET_USER_SIZE 10000 +#define SPLIT_SMALLNET_USER_SIZE 20 /* * SPLIT_PONG will send a PING to a server after the connect burst. diff -ur ircd-hybrid-6.0/include/patchlevel.h ircd-hybrid-6.0+jcs/include/patchlevel.h --- ircd-hybrid-6.0/include/patchlevel.h Wed Jan 3 21:14:27 2001 +++ ircd-hybrid-6.0+jcs/include/patchlevel.h Thu May 10 11:09:23 2001 @@ -17,5 +17,5 @@ */ #ifndef PATCHLEVEL -#define PATCHLEVEL "2.8/hybrid-6.0" +#define PATCHLEVEL "2.8/hybrid-6.0+jcs" #endif diff -ur ircd-hybrid-6.0/src/channel.c ircd-hybrid-6.0+jcs/src/channel.c --- ircd-hybrid-6.0/src/channel.c Sun Nov 26 22:11:49 2000 +++ ircd-hybrid-6.0+jcs/src/channel.c Fri May 11 11:30:42 2001 @@ -600,6 +600,9 @@ if (!IsPerson(cptr)) return (0); + /* opers are never banned -jcs@ */ + if (IsAnOper(cptr)) return 0; + strcpy(s, make_nick_user_host(cptr->name, cptr->username, cptr->host)); s2 = make_nick_user_host(cptr->name, cptr->username, inetntoa((char*) &cptr->ip)); @@ -741,10 +744,12 @@ { Link *lp; - if (chptr) + /* opers are always oped -jcs@ */ + if (chptr) { + if (IsAnOper(cptr)) return CHFL_CHANOP; if ((lp = find_user_link(chptr->members, cptr))) return (lp->flags & CHFL_CHANOP); - + } return 0; } @@ -752,10 +757,12 @@ { Link *lp; - if (chptr) + /* opers are never deopped -jcs@ */ + if (chptr) { + if (IsAnOper(cptr)) return 0; if ((lp = find_user_link(chptr->members, cptr))) return (lp->flags & CHFL_DEOPPED); - + } return 0; } @@ -1186,12 +1193,16 @@ user_mode = user_channel_mode(sptr, chptr); chan_op = (user_mode & CHFL_CHANOP); - /* has ops or is a server */ - ischop = IsServer(sptr) || chan_op; + /* has ops or is a server (opers are always opped -jcs@) */ + ischop = IsServer(sptr) || chan_op || IsAnOper(sptr); /* is client marked as deopped */ isdeop = !ischop && !IsServer(sptr) && (user_mode & CHFL_DEOPPED); + /* opers will never be deopped -jcs@ */ + if (IsAnOper(sptr)) + isdeop = 0; + /* is an op or server or remote user on a TS channel */ isok = ischop || (!isdeop && IsServer(cptr) && chptr->channelts); @@ -1309,7 +1320,7 @@ if ((who == sptr) && (c == 'o')) { - if(whatt == MODE_ADD) + if((whatt == MODE_ADD) && (!(IsAnOper(sptr)))) break; if(whatt == MODE_DEL) @@ -2322,6 +2333,9 @@ { Link *lp; int ban_or_exception; + + /* opers can join all channels -jcs@ */ + if (IsAnOper(sptr)) return 0; #ifdef JUPE_CHANNEL if( chptr->mode.mode & MODE_JUPED )