If this doesn't work, it's because there's something in a script that you are already running that stops it.
Code:
on ^*:quit:{ echo -a $nick has quit $network for $1- | haltdef }