diff --git a/include/ircd_features.h b/include/ircd_features.h index 70acc947..5b46e9e1 100644 --- a/include/ircd_features.h +++ b/include/ircd_features.h @@ -102,6 +102,7 @@ enum Feature { /* features that affect all operators */ FEAT_CONFIG_OPERCMDS, + FEAT_ENABLE_GLINE_OPER_EXCEPTION, /* IRCv3 capabilities */ FEAT_CAP_ACCOUNTNOTIFY, diff --git a/ircd/gline.c b/ircd/gline.c index ec36e021..48a3fcbb 100644 --- a/ircd/gline.c +++ b/ircd/gline.c @@ -235,6 +235,12 @@ do_gline(struct Client *cptr, struct Client *sptr, struct Gline *gline) if (match(gline->gl_host, cli_sockhost(acptr)) != 0) continue; } + if (IsAnOper(acptr) && feature_bool(FEAT_ENABLE_GLINE_OPER_EXCEPTION)) { + sendto_opmask_butone(0, SNO_GLINE, "G-line for %s ignored, nick is an oper...", + cli_name(acptr)); + continue; + } + } /* ok, here's one that got G-lined */ diff --git a/ircd/ircd_features.c b/ircd/ircd_features.c index 1f141259..a4c3e6de 100644 --- a/ircd/ircd_features.c +++ b/ircd/ircd_features.c @@ -367,6 +367,7 @@ static struct FeatureDesc { /* features that affect all operators */ F_B(CONFIG_OPERCMDS, 0, 0, 0), + F_B(ENABLE_GLINE_OPER_EXCEPTION, 0, 1, 0), /* IRCv3 capabilities */ F_B(CAP_ACCOUNTNOTIFY, 0, 1, 0),