+static void gameserver_rx_version( SteamNetworkingMessage_t *msg ){
+ netmsg_version *version = msg->m_pData;
+
+ int client_id = gameserver_conid( msg->m_conn );
+ if( client_id == -1 ) {
+ vg_warn( "Recieved version from unkown connection (%u)\n", msg->m_conn );
+ SteamAPI_ISteamNetworkingSockets_CloseConnection(
+ hSteamNetworkingSockets, msg->m_conn,
+ k_ESteamNetConnectionEnd_Misc_InternalError,
+ NULL, 1 );
+ return;
+ }
+
+ struct gameserver_client *client = &gameserver.clients[ client_id ];
+
+ if( client->version ){
+ vg_warn( "Already have version for this client (%d conn: %u)",
+ client_id, msg->m_conn );
+ return;
+ }
+
+ client->version = version->version;
+
+ if( client->version != NETWORK_SKATERIFT_VERSION ){
+ gameserver_send_version_to_client( client_id );
+ remove_client( client_id );
+ return;
+ }
+
+ /* this is the sign on point for non-auth servers,
+ * for auth servers it comes at the end of rx_auth
+ */
+ if( gameserver.auth_mode != eServerModeAuthentication ){
+ client->steamid = k_steamid_max;
+ gameserver_player_join( client_id );
+ }
+}
+