If you add an
echo -a $ial($nick)
echo -a $remove($mask($ial($nick),2),*!)

What does it print?