Added player support to the server

This code is essentially copied from the old branch, since the two
branches are now functionally identical. How much time have I wasted
rewriting this?