]>
Commit | Line | Data |
---|---|---|
1 | only disallow _local_ users setting usermode -i when feature AUTOINVISIBLE is turned on | |
2 | and do not enforce this setting on remote users, leads to desynch | |
3 | ||
4 | diff -r 8bf7e9b238c1 ircd/s_user.c | |
5 | --- a/ircd/s_user.c | |
6 | +++ b/ircd/s_user.c | |
7 | @@ -1328,8 +1328,7 @@ | |
8 | if (what == MODE_ADD) | |
9 | SetInvisible(sptr); | |
10 | else | |
11 | - if (!feature_bool(FEAT_AUTOINVISIBLE) || IsOper(sptr)) /* Don't allow non-opers to -i if FEAT_AUTOINVISIBLE is set */ | |
12 | - ClearInvisible(sptr); | |
13 | + ClearInvisible(sptr); | |
14 | break; | |
15 | case 'd': | |
16 | if (what == MODE_ADD) | |
17 | @@ -1447,6 +1446,12 @@ | |
18 | if (!FlagHas(&setflags, FLAG_PARANOID) && !(IsOper(sptr) && HasPriv(sptr, PRIV_PARANOID))) | |
19 | ClearParanoid(sptr); | |
20 | ||
21 | + /* disallow ordinary users to do MODE -i when feature AUTOINVISIBLE is enabled */ | |
22 | + if (FlagHas(&setflags, FLAG_INVISIBLE) && !IsInvisible(sptr) && /* MODE -i */ | |
23 | + feature_bool(FEAT_AUTOINVISIBLE) && /* AUTOINVISIBLE is enabled */ | |
24 | + !FlagHas(&setflags, FLAG_OPER) && !FlagHas(&setflags, FLAG_LOCOP)) /* (was) not opered */ | |
25 | + SetInvisible(sptr); | |
26 | + | |
27 | /* | |
28 | * only send wallops to opers | |
29 | */ |