You can indeed use that event, however after trying it, there's a problem, $server is $null ($network can't be used, that value is retrieved when you successfuly connect to a server).
This seems to be a bug so I'm not sure about what you can do in the meantime