er, it would be
$banmask iswm $ial($nick)
if anything :P but with $ialchan() you no longer need any if statements (or $iif), you can be sure it will return only nicks affected by the ban