Btw, there's no need for the $sock() check - he could merely do:
- sockclose name
sockopen name addy port
A nice thing about /sockclose is that it already does an internal check and doesn't display an error if you're trying to close a nonexistent socket. Something similar to /.remove filename. I would like to see /hfree and /comclose working in the same way...