How about:
$fsomehting(-1)
$fsomething(0)
$fsomething(1)
etc to work like other alias's and for instance
-1 return the current alias..
0 the total in the call stack
and 1 -> each alias in the call stack..
maybe even allow a the debug command to output into a window various bits on information during the running of a certain event or specific alias. as to track errors.
say:

Code:
 
EVENT: text
$chan: #chan $1- Bleh somehting something
SET %var = 1
WHILE
CMD msg
SET %var = 2
WHILE NEXT
CMD msg
SET %var = 3
WHILE EXIT
CMD echo
ALIAS aliasname{parameters}
   CMD msg
ALIAS END
EVENT END
 


or something to that kind of effect..

Cheers!