instead of having two on text events for ! and @record, you could do:
on $*:TEXT:/^[!@]record/Si:#:{
then just set a var like:
var %msgway = $iif($left($1,1) == @,msg $chan,notice $nick)
and then put %msgway record stuff here