I'll recommend that you use $addtok() $remtok(), and $istok()
set %block $addtok(%block,#,32)
to add channels.
set %block $remtok(%block,#,1,32)
to remove channels.
Then use:
on *:text:*:#:{
if ($istok(%block,#,32)) { halt }
This way you don't waste var space when you can store the values from left to right.