diff --git a/Changes b/Changes index b303c02db..528e90a2a 100644 --- a/Changes +++ b/Changes @@ -569,3 +569,4 @@ seen. gmtime warning still there this hook returns >0 the register_user exits - Removed src/agent.c (empty file) - Removed src/userload.obj from the win32 makefile +- Added link::options::quarantine suggested by DumbFish diff --git a/include/struct.h b/include/struct.h index 72659a51e..bdc7f6edc 100644 --- a/include/struct.h +++ b/include/struct.h @@ -257,6 +257,7 @@ typedef unsigned int u_int32_t; /* XXX Hope this works! */ #endif #define FLAGS_DCCBLOCK 0x40000000 #define FLAGS_MAP 0x80000000 /* Show this entry in /map */ +#define FLAGS_QUARANTINE 0x100000000 /* Dec 26th, 1997 - added flags2 when I ran out of room in flags -DuffJ */ /* Dec 26th, 1997 - having a go at @@ -803,6 +804,7 @@ typedef struct ircstatsx { #define CONNECT_SSL 0x000001 #define CONNECT_ZIP 0x000002 #define CONNECT_AUTO 0x000004 +#define CONNECT_QUARANTINE 0x000008 struct Client { struct Client *next, *prev, *hnext; diff --git a/src/s_conf.c b/src/s_conf.c index 1235d35ae..b5440d825 100644 --- a/src/s_conf.c +++ b/src/s_conf.c @@ -207,6 +207,7 @@ static OperFlag _LinkFlags[] = { { CONNECT_AUTO, "autoconnect" }, { CONNECT_SSL, "ssl" }, { CONNECT_ZIP, "zip" }, + { CONNECT_QUARANTINE, "quarantine"}, { 0L, NULL } }; diff --git a/src/s_serv.c b/src/s_serv.c index abc056633..c47a7b51d 100644 --- a/src/s_serv.c +++ b/src/s_serv.c @@ -860,7 +860,8 @@ int m_server(cptr, sptr, parc, parv) "Disallowed by connection rule"); } } - + if (aconf->options & CONNECT_QUARANTINE) + cptr->flags |= FLAGS_QUARANTINE; /* Start synch now */ m_server_synch(cptr, numeric, aconf); } diff --git a/src/s_user.c b/src/s_user.c index 9bd9b09e6..c465b6eb1 100644 --- a/src/s_user.c +++ b/src/s_user.c @@ -4430,6 +4430,9 @@ int m_umode(cptr, sptr, parc, parv) break; /* since we now use chatops define in unrealircd.conf, we have * to disallow it here */ + case 'o': + if(sptr->srvptr->flags & FLAGS_QUARANTINE) + break; case 'b': if (ALLOW_CHATOPS == 0 && what == MODE_ADD && MyClient(sptr)) @@ -4767,6 +4770,8 @@ int m_svs2mode(cptr, sptr, parc, parv) } goto setmodey; case 'o': + if (acptr->srvptr->flags & FLAGS_QUARANTINE) + break; if (what == MODE_ADD && !(acptr->umodes & UMODE_OPER)) IRCstats.operators++;