From: wiebe Date: Tue, 20 Apr 2010 12:43:07 +0000 (+0200) Subject: enforceinvisible: only disallow _local_ users setting usermode -i when feature AUTOIN... X-Git-Url: https://jfr.im/git/irc/quakenet/snircd-patchqueue.git/commitdiff_plain/05278a28ae15f587e7788c9cfe8d0ff813534b0d enforceinvisible: only disallow _local_ users setting usermode -i when feature AUTOINVISIBLE is turned on - do not enforce this on remote users --- diff --git a/enforceinvisible.patch b/enforceinvisible.patch new file mode 100644 index 0000000..c1b1ed0 --- /dev/null +++ b/enforceinvisible.patch @@ -0,0 +1,29 @@ +only disallow _local_ users setting usermode -i when feature AUTOINVISIBLE is turned on +and do not enforce this setting on remote users, leads to desynch + +diff -r 8bf7e9b238c1 ircd/s_user.c +--- a/ircd/s_user.c ++++ b/ircd/s_user.c +@@ -1328,8 +1328,7 @@ + if (what == MODE_ADD) + SetInvisible(sptr); + else +- if (!feature_bool(FEAT_AUTOINVISIBLE) || IsOper(sptr)) /* Don't allow non-opers to -i if FEAT_AUTOINVISIBLE is set */ +- ClearInvisible(sptr); ++ ClearInvisible(sptr); + break; + case 'd': + if (what == MODE_ADD) +@@ -1447,6 +1446,12 @@ + if (!FlagHas(&setflags, FLAG_PARANOID) && !(IsOper(sptr) && HasPriv(sptr, PRIV_PARANOID))) + ClearParanoid(sptr); + ++ /* disallow ordinary users to do MODE -i when feature AUTOINVISIBLE is enabled */ ++ if (FlagHas(&setflags, FLAG_INVISIBLE) && !IsInvisible(sptr) && /* MODE -i */ ++ feature_bool(FEAT_AUTOINVISIBLE) && /* AUTOINVISIBLE is enabled */ ++ !FlagHas(&setflags, FLAG_OPER) && !FlagHas(&setflags, FLAG_LOCOP)) /* (was) not opered */ ++ SetInvisible(sptr); ++ + /* + * only send wallops to opers + */ diff --git a/series b/series index 4837aa8..55bd602 100644 --- a/series +++ b/series @@ -7,6 +7,7 @@ cprivmsgerracconly.patch badchanzombie.patch badchanlocalkick.patch nserverflag.patch +enforceinvisible.patch minoplevel.patch ischannelservice.patch invalidatebanssethost.patch