I'm on many nets, and I mainly deal with bots which keep huge channels clean of spam, as you have surely noticed spam bots are fast, and sometimes when they get banned they can get nick list and send spam. That's why I want channel bans to be active as long as possible, .set ban-time isn't a solution because channel usage is different in the morning and at night etc etc.
- How would unban.tcl work?
Unban.tcl would make bot scan channel ban list every "X" mins and if channel bans reached "Y" it would take off the oldest "Z" bans. So, for example a bot on DALnet could have settings like X - 5, Y - 95, Z - 5, so bot would scan channel ban list every 5 mins and if it reached 95 channel bans it would take off 5 the oldest channel bans.
Thanks in advance.
this is beginning I've stuck I don't know how to make bot count bans, and then if bans reach max value checking which ones are the oldest and unbainng Z bans.
#bleh
set bancheckt "5"
set maxbans "95"
set removebans "5"
set banchannel "#channel"
# code
if {![info exists banchecktimer_running]} {
timer $bancheckt banchecktimer
set banchecktimer_running 1
}
proc banchecktimer { } {
foreach bansentry [chanbans $banchannel] {
}
