But you could cycle the ial to grab all nicks affected by that ban.
(Assuming that the ban precedes a possible kick in a kickban situation - but that applies to aprox. 90% of instances)
on *:BAN:#: {
var %x = 1, %banned
while ($ialchan($banmask,#,%x).pnick) { var %banned = $addtok(%banned,$ifmatch,32) | inc %x }
write kbans.txt $timestamp $nick banned $banmask on # $iif((%banned),affecting: %banned)
write kbans.txt -
}
If you remove the ".pnick" property in the while statement, it will grab and write not the pnicks but the full addresses of users affected by the ban. On the other hand side, this will cause a much longer line, and, if a ban matches a LOT users, increase the risk of a "line too long error".