more client-server packet handling stuff