RusselB must have been in a hurry so Ill explain the code for him incase anyone wants to know.

It sets a timer when you ban the person to unban them in 14 days.
Since there is a darn good chance you wont stay connected or even have mirc open that long he also added some backups. Every time you are opped in a channel it checks every entry in the ban list and if it has been more than 14 days it unbanes them but if not it sets a timer to unset it in the remaining time it had.
So, if you restarted mirc and connected and were opped in #channel and #channel had one user who was banned 7 days ago, it will set a timer to unban that user in 7 days so they will have served the whole 14 days.

This is a pretty good system except for the fact that you can be reopped in a channel without having disconnected so this code can end up having multiple timers for each entry.

To fix this problem I will edit his code to include a name in the timer that uses the channel name and banned address and then if it is setting a timer that already exists it will just overwrite it instead of making a duplicate.

Also, while it may appear that the brackets are off and the else line and inc %a are outside the while loop it was just the way he wrote it, its actually just fine.

Anyone using the code should consider changing the # in the events to a specific channel. Don't forget you can do multiple channels by seperating with a comma like
Code:
on *:text:!trigger:#testing,#anotherchannel:{ commands }

Heres the new code with the timer line changed to name the timer so we can avoid multiple timers for each entry stacking up.
Code:
on *:op:#:{
  if $opnick == $me {
    var %a = 1
    while %a <= $ibl($chan,0) {
      if $calc($ctime - $ibl($chan,%a).ctime) > 1209600 {
        .mode -b $chan $ibl($chan,%a)
    }
    else {
      .timer $+ $chan $+ $ibl($chan,%a) 1 $calc($v2 - $v1) .mode $safe($chan) -b $ibl($chan,%a)
    }
    inc %a
    }
  }
}
on *:ban:#:{
  .timer 1 1209600 .mode -b $safe($chan) $banmask
}
alias safe return $!decode( $encode($1,m) ,m)

Good luck.


I've gone to look for myself. If I should return before I get back, please keep me here.