When restarting a bot, it waits for a period equal to the "ban-time" before starting removing bans equal to "ban-time" or older. By removing older ones, it means that it is able to remove bans set before it joined a channel. Therefore, why doesn't it start removing bans as soon as it joins a channel?
My question wasn't how to make a bot removed expired bans but why does it have to wait a period of time equal to the "ban-time" (60 minutes) after joining a channel before starting to cleanup the channel banlist?
ex.:
Bot left channel 7:45
Bot rejoined channel 8:00
It won't start cleaning the channel banlist before 9:00
and when it does, it will remove all bans which have been on the channel for more than 60 minutes.
ah i misread your question... seems like this would be easy enough to manipulate via tcl. You've explained what happens atm, could you also let us know what you wish the end result to be...just cos I'm dense like a brick
My eggdrop doesn't have individual ban-time per channel but uses "global-ban-time".
set global-ban-time 60
08:00 bans #1
08:15 bans #2
08:30 bot joined channel
09:30 bot removed bans 1 and 2.
In order remove these bans, it has to update its internal channel banlist (or something similar). It seems that there is something being triggered after 60 minute which tells the bot to wake up and start checking the channel banlist for overdue bans which needs to be removed.
I presume that there is an operation being done through a timer which evaluates the time length of a ban:
time present - ban-time > 60 minutes
in order to identify overdue bans.
The only thing I am wondering is why does it have to wait for a period of time equal to the ban-time before working on the channel banlist rather than doing it as soon as it joins a channel?