Preserve status through unintentional disconnects

I think I did okay with this, but not completely certain. Could this be
coded better?
Also, all UI elements with the cool custom right-click menus have had
the default right-click menus disabled