I don't know why the parameter error occurs but the other problem is obvious. You put all the whois info in one var, so in essence you have one long string. Then you test by seeing if there is any occurrence of "#test" in that string, and of course there's "#test" in "#test2"

To fix that last problem you have to find out what the delimiter is between information (comma or space or whatever). Suppose that a comma is the delimiter (think it's a space tho), then you have to change your test to finding an occurrence of the channelname + delimiter in the string, so look for "#test," instead.

you can do this easily by $+(%blacklist,$chr(delimiternumber))

This does not completely solve it either, as the last piece of information has no delimiter after it normally (check it), so you will have to append %blacklist.check with a delimiter before going into your checking loop.

Also, double dashes are not necessary in scripts, you can just leave them out.