http://pastebin.com/dRTffgbB
Basically, I had a go (several gos, actually) at fixing this and I'm really not sure what to do. If anybody could explain why this isn't working (and more to the point, how I'd fix it), that'd be great, as I don't know much about coroutines etc.
The server works, so I didn't include it.
This whole thing is supposed to require as little messing around from the client program as possible.











