You could play around with these $iifs too if you felt like it.
did $iif(m isincs $chan(%channel).mode,-c,-u) test 38
mode $chan $iif(m isincs $chan(%channel).mode,+m,-m)
if ($active !ischan) return
I know there is noting suckier than someone telling you to read the help file, but the dialog part of the help file covers alot of good stuff.