What you're basically doing here is asking for someone else to make you code for a server-client system.
And if you didn't mean to ask just that, read your post for yourself.
---
Anyway, we split into two parts -
The LOBBY bit, which allows you to choose a server, and get and pass it's IP address to the next bit without the user having to type it in.
Then you've got the ACTUAL IN-GAME bit.
With a bit of thought, both of these are pretty easy. Unfortunately, I have gone insane and will be back later, probably with a potato.
Mr Blanky - This Time, It's Personal