I realized my channel script sucks and I'm thinking of writing a channel protection script that will handle all channel offenses (flood, repeat, caps, colors, spam, bad words, etc. lame behaviour) in uniform way, counting offenses and punishing in different fashion by their number (e.g. 1-st by warning, 2-nd by kick, 3-rd by ban) - all configurable all the way, in real time, via chan settings; it will also have automatic +mi closing on flood and dynamic +l limiter
functionally similar, but not quite; also, the implementation will be radically different from most, if not all such scripts - I mean, the keyword here is uniformity, which implies reuse of code; also, I intend to make the configuration part entirely based on chan settings, i.e. you won't need to edit the script at all
Yeah that might be better for some users, I was intending to add some dynamic settings in allfloodprotection (not to all settings though) only to some most commonly exposed to change settings. Anyway, I'm for such a script especially from you
well, it probably won't have all of the conceivable offenses punishment out there, but I'll try to optimize it for performance and make it relatively modular, so new features could be added easily, even by others
as I said, it will be functionally similar, to some extent, to all such scripts (including Sir_Fz's), i.e. it will be punishing for flood/lameness; however, similarity ends here - it will have completely different configuration, all done with chan settings (you don't edit the script, you don't write config file - that allows you to change script's behaviour on-the-fly, without logging to shell, editing files, rehashing), and its internal organization and implementation will also be quite different from all the others I have seen so far - much more streamlined and modular (I hope hehe)
Modular sounds good. That have always been my objection against the all-in-one type scripts. I really dont want 10 types of flood protection when maybe only 2-3 of them apply to my channel/situation.
set conf1g(repeat) {w:k:b 1 10 "repeating is lame"}
this means: standard configuration for the repeat handler - "w:k:b" is punishment order (1st - warning, 2nd - kick, 3rd - ban and so on); 1 is bantype (see [maskhost] proc); 10 is bantime in minutes; "repeating is lame" is default kick/ban reason
these config types are standard for all offense handlers
meaning: custom configuration for the repeat handler - name of config parameter, udef type, value - at most 2 repeats in 10 seconds allowed
these config types are specific for each offense handler
common cleanup routine, triggered by timer; it operates on config array specifying which arrays need to be periodically purged of old records:
the meaning is: purge the offenses array every 10 mins from records older than 720 mins (12 hours), and purge the repeat array every 2 mins from records older than 5 mins
so basically, all I need to do when adding new handlers is to set up corresponding config arrays records (and cleanup array, if needed); then write the [bind pubm] handler, simply using [punish] as needed
Looks awsome mate, very well done. And working with [unixtime] instead of timers is also a great idea (also I liked the punishment mechanism, you had a good though about it). IMO, the script is very proffesional. Keep it up.
demond wrote:I need to write a vhost cloner to test it since I don't have dronenet hehe
Why write them again, there are plenty of these on polish websites, for example hyrda, xmen2, cloner ...
They're mostly optimized for IRCnet but should also work (mass join channels - basically that's what you need, right?) on other networks too.