intresting way of coding the on join event. but you can simplify your code.
on :text:#:!: {
if ($1 == !aoh) { ;put what the command does in this area and close with a bracket.
if ($1 == !aop) {
if ($1 == !aov) {
if ($1 == !delaop) {
if ($1 == !delaov) {
if ($1 == !delaoh) {
}
then your on text event can go down here.