Here is everything in one script. Change it to suit your needs.
on 1:text:!unban *:[color:red]#Channel2[/color]:{
if ($2 == list) {
if ($ibl([color:red]#Channel1[/color],0) != 0) {
msg # Ban list for [color:blue]#Channel1[/color]:
var %i = 1
while (%i <= $ibl([color:red]#Channel1[/color],0)) {
msg # %i $+ : $ibl([color:red]#Channel1[/color],%i)
inc %i
}
}
else { msg # [color:blue]#Channel1[/color] has no bans! }
}
else if ( ! isin $2 && @ isin $2) {
if ($2 isban [color:red]#Channel1[/color]) {
mode [color:red]#Channel1[/color] -b $2
}
else {
msg # $2 was not found on [color:blue]#Channel1[/color] ban list.
}
}
else { msg # $2 is not a valid banmask. }
}
If you want to show who made the ban then
Change this line
msg # %i $+ : $ibl([color:red]#Channel1[/color],%i)
To this
msg # %i $+ : $ibl([color:red]#Channel1[/color],%i) set by $ibl([color:red]#Channel1[/color],%i).by
You can also do:
$ibl(
#Channel1,%i).date - This will show the date and time of the ban