Aside from correcting the ON TEXT events so that they use the correct format, the 2nd structure could use if/elseif/else rather than several if's with halt's.
alias blah {
if ($1 == 1) { blah }
if ($1 == 2) { blah }
if ($1 == 3) { blah }
}
alias blah {
if ($1 == 1) { blah }
elseif ($1 == 2) { blah }
elseif ($1 == 3) { blah }
}
I use elseif mainly for stacking if-statements, does is have any added value in this scenario?