I would make it: (dunno if its correct) on @:TEXT:!avoice:#:{ if ($2 == on) { set %A-V $+ [ $+ $chan $+ ] on } if ($2 == off) { unset %A-V $+ [ $+ $chan $+ ] } } on :JOIN:#:{ if (%A-V $+ [ $+ $chan $+ ] == on) mode $chan +v $nick } else if ( %A-V $+ [ $+ $chan $+ ] == $null) halt } }