on 600:text:*:#:{ if $1 == ban { if !$2 { msg $chan Usage: ban [reason] | halt } var %ctime = $ctime var %canal = $chan var %masca = $2 var %motiv = $3- var %adresa = $address($2,2) if (!$3-) { set %motiv No Reason supplied } if (* isin %masca) { if (*!*@ isin %masca) { writeini -n banlist.ini %canal %masca %ctime %motiv | msg $chan 1New %canal ban: %masca ( $+ %motiv $+ ) | kick $chan $ial($2,1).nick Banned: %motiv | mode %canal +b %masca | halt } } writeini -n banlist.ini %canal %adresa %ctime %motiv msg $chan 1New %canal ban: %adresa ( $+ %motiv $+ ) kick %canal %masca Banned: %motiv mode %canal +b %adresa } if ($1 == bans) { if ($2 == $null) { set %cnl #PaulOakenfold } var %nick.ibl = $gettok($gettok(%ibl.date,2,64),1,32)) var %me.ibl = $gettok($gettok($address($me,2),2,64),1,32)) if (%nick.ibl !== %me.ibl) { set %* $chr(42) } if ($ibl(%cnl,0) == 0) { notice $nick 1Global bans: notice $nick 1Channel bans for %cnl $+ : (* = not placed by bot) notice $nick 1(There are no bans, permanent or otherwise.) notice $nick 1Use '.bans all' to see the total list. } else { notice $nick 1Global bans: notice $nick 1Channel bans for %cnl $+ : (* = not placed by bot) ban.status notice $nick 1Use '.bans all' to see the total list. } } if ($2 !== $null) && ($chr(35) isin $2) { set %cnl $2 var %nick.ibl = $gettok($gettok(%ibl.date,2,64),1,32)) var %me.ibl = $gettok($gettok($address($me,2),2,64),1,32)) if (%nick.ibl !== %me.ibl) { set %* $chr(42) } if ($ibl(%cnl,0) == 0) { notice $nick 1Global bans: notice $nick 1Channel bans for %cnl $+ : (* = not placed by bot) notice $nick 1(There are no bans, permanent or otherwise.) notice $nick 1Use '.bans all' to see the total list. } else { notice $nick 1Global bans: notice $nick 1Channel bans for %cn $+ : (* = not placed by bot) ban.status notice $nick 1Use '.bans all' to see the total list. } } }ban.status { var %i = 1 while (%i <= $ibl(%cnl,0)) { set %ibl $ibl(%cnl,%i) set %ibl.by $ibl(%cnl,%i).by set %ibl.date $ibl(%cnl,%i).date set %ibl.ct $ibl(%cnl,%i).ctime set %ibl.ctime $duration($calc($ctime - %ibl.ct)) notice $nick 1 $+ %* $chr(91) $+ %i $+ $chr(93) %ibl ( $+ %ibl.by $+ ) %ibl.date  $+ %ibl.ctime $+  inc %i } }