How are you disconnecting from several network ? I've tried to use $? in a on disconnect event, and even when I disconnect from several network, it work, i've used :
Code:
on *:disconnect:echo -a $$?="test $network "
Using /quit or the disconnect button. Neither prompted.