". get_lang("mods") .""; echo "
". get_lang("extra_cmd_line_info") ."
\n"; $enabled_mods = $db->getHomeMods($home_id); $home_info = $db->getGameHomeWithoutMods($home_id); $server_xml = read_server_config(SERVER_CONFIG_LOCATION.$home_info['home_cfg_file']); $remote = new OGPRemoteLibrary($home_info['agent_ip'],$home_info['agent_port'],$home_info['encryption_key'], $home_info['timeout']); if( empty($enabled_mods) ) { $cpu_count = $remote->cpu_count(); if($cpu_count === -1) { print_failure( get_lang("warning_agent_offline_defaulting_CPU_count_to_1") ); $cpu_count = 'NA'; } else { // cpu numbering starts from 0 so lets remove the last cpu. $cpu_count -= 1; } $game_mods = $db->getAvailableModsForGameHome($home_id); foreach ( $game_mods as $game_mod ) { if( preg_match("/^none$/i", $game_mod['mod_name']) ) { $mod_cfg_id = $game_mod['mod_cfg_id']; break; } } if( isset($mod_cfg_id) ) { if ( $db->addModToGameHome($home_id,$mod_cfg_id) === FALSE ) { print_failure(get_lang_f('failed_to_assing_mod_to_home',$mod_cfg_id)); } else { $maxplayers = $server_xml->max_user_amount ? $server_xml->max_user_amount : 0; if( $db->updateGameModParams($maxplayers,'','NA','0',$home_id,$mod_cfg_id) === FALSE ) { print_failure(get_lang_f('failed_to_assing_mod_to_home',$mod_cfg_id)); } else $enabled_mods = $db->getHomeMods($home_id); } } else { print_failure( get_lang("note") .":". get_lang("note_no_mods") ); echo ""; } } if( !empty($enabled_mods) ) { $cpu_count = $remote->cpu_count(); if($cpu_count === -1) { print_failure( get_lang("warning_agent_offline_defaulting_CPU_count_to_1") ); $cpu_count = 'NA'; } else { // cpu numbering starts from 0 so lets remove the last cpu. --$cpu_count; } echo "| ". " | ". get_lang("mod_name") ." | "; if ( $server_xml->max_user_amount ) echo "". get_lang("max_players") ." | "; echo "". get_lang("extra_cmd_line_args") ." | ". "". get_lang("nice_level") ." | ". " |
| [ ". get_lang("remove_mod") ." ] ". "". get_lang("mod_install_cmds") ." | \n".
"".$enabled_rows['mod_name']." | \n". "\n"; if ( $server_xml->max_user_amount ) { echo create_drop_box_from_array(range(0,$server_xml->max_user_amount), 'maxplayers',$enabled_rows['max_players'],true). " | "; } echo "". " | \n"; echo create_drop_box_from_array(array_merge(range(-19,19)), 'nice',$enabled_rows['nice']). " | \n". "\n". " |
". get_lang("cpu_affinity_info") ."
\n"; echo '