this line
mode %channel -oahv %nick %nick %nick %nick
could be
mode %channel -oahv $str($v1 $chr(32),4)
but all in all nice work