Ported all the net functions over from room quake