You're missing the closing bracket for the first on text event. Also:
mode $chan +b ~q: $+ $v1 | mode $chan +b ~n: $+ $v1
Can be:
mode $chan +bb ~q: $+ $v1 ~n: $+ $v1
Etc.