;Example exception list, full host as used when banned separated by spaces
;%ban_except Guest*!*@* nick_here!*@* *!*@Teh.Word
on *:quit:{
;turn off 24 hour unban timer
if ($nick == $me) && ($timer(bans. $+ $scid($cid).network)) .timerbans. $+ $scid($cid).network off
}
;turn off 24 unban timer
on *:part:#chan:if ($nick == $me) && ($timer(bans. $+ $scid($cid).network)) .timerbans. $+ $scid($cid).network off
on *:join:#chan:{
;turns on 24 hour unban timer
if ($nick == $me) .timerbans. $+ $scid($cid).network 0 300 check_bans $chan
}
;reads the ban list
RAW 367:*:{
if (%chkbans) && ($calc( $ctime - $5 ) > 1800 ) && (!$istok(%ban_except,$3,32)) {
if (!%bcount) { set %bcount 0 | .timerblist 1 15 btimer $2 }
if (%bcount <= $calc( $modespl - 1 )) { set %blist $3 %blist | inc %bcount }
if (%bcount > $calc( $modespl - 1 )) { .timerblist off | mode $2 $+(-,$str(b,%bcount)) $($+(%,blist),2) | unset %bcount | unset %blist }
halt
}
elseif (%chkbans) halt
}
RAW 368:*: if (%chkbans) halt
;ban checking alias, set on timer
alias check_bans { set -u15 %chkbans 1 | mode $1 b }
;unban alias, set on timer
alias btimer { mode $1 $+(-,$str(b,%bcount)) $($+(%,blist),2) | unset %bcount | unset %blist }