Looking for a script that will log channel (#channel1) bans as in: when they were set, by who, what is the ban and announce in #channel2 every 30 mins how long its been since those bans added.
ie:
#channel1:
[14:03] * johnny sets mode: +b *!*@sphex.users.quakenet.org
[14:15] * johnny sets mode: +b *!*@tony.users.quakenet.org
[17:33] * johnny sets mode: -b *!*@tony.users.quakenet.org
#channel2:
[14:33] <Bot> *!*@sphex.users.quakenet.org is still banned in #channel1, the ban was set 30 minutes ago by johnny
[14:45] <Bot> *!*@tony.users.quakenet.org is still banned in #channel1, the ban was set 30 minutes ago by johnny
[18:03] <Bot> *!*@sphex.users.quakenet.org is still banned in #channel1, the ban was set 240 minutes ago by johnny
This applies only to bans that are still listed as bans in #channel1, not those that have been removed in the meantime
It seems to be working pretty good, one thing though, it doesn't calculate the bans' time correctly.. I mean, it doesn't look at the banlist and check when the ban was aded right? because when I restarted the bot, 30 mins later when announcing the bans it said all the bans were added 30 mins ago and that wasn't the case
The script checks the banlist in the channel, not the bot's internal banlist. If a ban is already present when the bot joins the channel, it will use it's own time of joining the channel as the ban creation time.
you could alternatively have the bot match the raw numeric for bans, to match when they were really set on channel.
For example, /mode #channel1 b
This would return a list of banmasks, in the order they were banned (latest at the top, with older bans below). You could match the (time it was set) and either keep the ( ) in output, or parse them off.
It's an idea, but personally, the code that nml375 posted is perfect and would only require minimal tweaking to work on a raw bind.
We explore.. and you call us criminals. We seek after knowledge.. and you call us criminals. We exist without skin color, without nationality, without religious bias.. and you call us criminals.