I had already fixed the bug of your first code was on line 10.

I replaced this line:
Code:
if ($1 isin %nick) {


For this:
Code:
if ($findtok(%nick,$1,32)) {