Menu

#19 modelock instead of protect-chmodes

open
nobody
None
5
2008-04-23
2008-04-23
wilk
No

protect-chmodes code is pretty much broken and useless nowadays. Flaws are:

- any op (even not added) can change any unprotected flag (without +/-)
- any op (even not added) can remove protected mode (with +) without any punishment (!) mode is only bounced back
- bot fights with self when keepout/autolimit is in use and protect-chmode has -il
- -* sets -r flag for "#" channels, this flag is only present on "!" channels (I have not checked in debug mode if code fight with server when bot is on #)

Solution (partially also idea by TingelTangelBob) is "modelock":

* bot should be aware of keepout/autolimit/channellock and not fight it back
* +flags should be always set and protected from removing
* -flags should be protected from setting
* flags from modelock should be bounced back
* abusers of modelock should be punished according to following rules (this rules should be also applied to whole bot protection):

Group A - high risk or core flags: IRiklr sptn - only +n can play with them ("sptn" could be moved to B group - maybe by .cset?)
Group B - normal flags: em - +m can play with them
Group C - low risk flags: b - +o can play with them

For example: user with +m will be punished for setting flag +i, but not for flag +m - in both cases mode should be bounced back, not added users should be always punished

Why "m" is in group B? Because it is vital for keeping channel clean and tidy, and masters should have such priviledge as also adding ban exempts. Now (except protect-chmodes bugs) master flag is almost useless for normal user - it only allows for opping.

* flag "r" should be only allowed and protected in modelock for "!" channels
* current channel lists protection from user-* .cset should restrict above groups for flag "e" - 0: anyone can change entry; 1: only +m (not +n as now it is)/+b/server can change entry; 2: only partyline entries are protected, other are reverted

Discussion


Log in to post a comment.