It's a good idea but why not use dynamic variables:
Code:
set $+(somevar,$network)
;or
set $+(somevar,$scid)

And then..
Code:
ON *:DISCONNECT: {
unset $+(*,$network)
;or
unset $+(*,$scid)

Don't think i'm trying to diss your suggestion i just thought of proposing something smile