]>
Commit | Line | Data |
---|---|---|
05278a28 | 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 | ||
b36cd863 | 4 | diff -r c7e5032326a7 ircd/s_user.c |
05278a28 | 5 | --- a/ircd/s_user.c |
6 | +++ b/ircd/s_user.c | |
1e16022d | 7 | @@ -1252,8 +1252,7 @@ |
05278a28 | 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) | |
b36cd863 | 17 | @@ -1380,6 +1379,12 @@ |
18 | SetHiddenHost(sptr); | |
19 | } | |
05278a28 | 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 | */ |