i think for every line of the ban or
you can just add 2 after $nick as the mask for the ban,
e.g.
just a suggestion, i did the same and it worked :)