From 8a86cd3f600140e9553a806ca12a03d1ada5bf78 Mon Sep 17 00:00:00 2001 From: Phil Date: Tue, 5 Jan 2016 21:42:22 +0100 Subject: [PATCH 1/9] lobby size Ability to adjust lobby size for cooperative gamemodes --- Insurgency/cfg/lgsm-default.cfg | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/Insurgency/cfg/lgsm-default.cfg b/Insurgency/cfg/lgsm-default.cfg index 7b56d44e5..add0dac2d 100644 --- a/Insurgency/cfg/lgsm-default.cfg +++ b/Insurgency/cfg/lgsm-default.cfg @@ -1,7 +1,7 @@ // **************************************************************************** // * // Ingurgency - server.cfg * -// Version 150815 * +// Version 050116 * // * // **************************************************************************** @@ -59,6 +59,7 @@ sv_playlist "nwi/coop" // "mapcycle_attackdefend.txt" - push & strike maps // "mapcycle_checkpoint.txt" - all checkpoint maps // "mapcycle_comp.txt" - firefight & elimination maps +// "mapcycle_conquer.txt" - conquer gamemode // "mapcycle_cooperative.txt" - survival, coop, hunt maps // "mapcycle_firefight.txt" - all firefight maps // "mapcycle_flashpoint.txt" - all flashpoint maps @@ -78,6 +79,13 @@ sv_playlist "nwi/coop" // //mapcyclefile "mapcycle.txt" +// .......................... Coop mode sesstings ........................... // + +// Set the maximum number of human players in Cooperative modes +// Maximum Value: 8 +// Default: mp_coop_lobbysize = 6 +// mp_coop_lobbysize = 6 + // ............................. Fast Download .............................. // // info: Allows custom maps to be downloaded to the client. From d5114d63581248092d09f2ef2d3c9a7e1ac2bc3c Mon Sep 17 00:00:00 2001 From: Phil Date: Tue, 5 Jan 2016 21:44:09 +0100 Subject: [PATCH 2/9] typo --- Insurgency/cfg/lgsm-default.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Insurgency/cfg/lgsm-default.cfg b/Insurgency/cfg/lgsm-default.cfg index add0dac2d..ef8739d35 100644 --- a/Insurgency/cfg/lgsm-default.cfg +++ b/Insurgency/cfg/lgsm-default.cfg @@ -79,7 +79,7 @@ sv_playlist "nwi/coop" // //mapcyclefile "mapcycle.txt" -// .......................... Coop mode sesstings ........................... // +// .......................... Coop mode settings ........................... // // Set the maximum number of human players in Cooperative modes // Maximum Value: 8 From 6f5015a9edc1450203fb4b7f16883fd42b47395c Mon Sep 17 00:00:00 2001 From: Phil Date: Wed, 6 Jan 2016 19:55:37 +0100 Subject: [PATCH 3/9] More config options --- Insurgency/cfg/lgsm-default.cfg | 183 ++++++++++++++++++++++++++++++-- 1 file changed, 174 insertions(+), 9 deletions(-) diff --git a/Insurgency/cfg/lgsm-default.cfg b/Insurgency/cfg/lgsm-default.cfg index ef8739d35..b8a98558c 100644 --- a/Insurgency/cfg/lgsm-default.cfg +++ b/Insurgency/cfg/lgsm-default.cfg @@ -1,7 +1,7 @@ // **************************************************************************** // * // Ingurgency - server.cfg * -// Version 050116 * +// Version 060116 * // * // **************************************************************************** @@ -10,9 +10,6 @@ // Hostname for server. hostname "" -// RCON - remote console password. -rcon_password "" - // Server password - for private servers. sv_password "" @@ -23,10 +20,26 @@ sv_contact "email@example.com" // Default: sv_lan 0 sv_lan 0 -// Set maximum Server FPS +// Set maximum server FPS // Default: fps_max 300 fps_max 300 +// ........................... RCON Configuration .......................... // + +// RCON - remote console password. +rcon_password "" + +// Number of minutes to ban users who fail rcon authentication +// min. 0 +sv_rcon_banpenalty 10 + +// Enable/disable rcon logging +sv_rcon_log 1 + +// Max number of times a user can fail rcon authentication before being banned +// min. 1 max. 20 +sv_rcon_maxfailures 5 + // ......................... Matchmaking Playlists ......................... // // info: Selecting a playlist will allow the server to show up in matchmaking. // Playlists use predefined settings and mapcycle. @@ -79,12 +92,164 @@ sv_playlist "nwi/coop" // //mapcyclefile "mapcycle.txt" -// .......................... Coop mode settings ........................... // +// .......................... Coop Mode Settings ............................ // +// info: Settings for all cooperative gamemodes // Set the maximum number of human players in Cooperative modes -// Maximum Value: 8 -// Default: mp_coop_lobbysize = 6 -// mp_coop_lobbysize = 6 +// Maximum value: 8 +// Default: mp_coop_lobbysize 6 +//mp_coop_lobbysize 6 + +// Set the minimum number of bots +//mp_coop_min_bots 5 + +// Set the maximum number of bots +// Maximum value: maxplayers - mp_coop_lobbysize +//mp_coop_max_bots 18 + +// ........................... Voting Settings .............................. // + +// Allow voting? +sv_allow_votes 1 + +// Is map voting enabled? +sv_map_voting 1 + +// Allow spectators to vote? +sv_vote_allow_spectators 0 + +// A vote that fails cannot be re-submitted for this long +sv_vote_failure_timer 300 + +// Can people hold votes to change AI count? +sv_vote_issue_botcount_allowed 1 + +// The voting population required to pass a bot count vote +// min. 0.1 max. 1 +sv_vote_issue_botcount_min_population 0.55 + +// What ratio of the votes needs to be yes to pass? (1 = All votes need to be yes) +// min. 0 max. 1 +sv_vote_issue_botcount_min_ratio 0.5 + +// Can people hold votes to change AI difficulty? +sv_vote_issue_botdifficulty_allowed 1 + +// The voting population required to pass an AI difficulty vote +// min. 0.1 max. 1 +sv_vote_issue_botdifficulty_min_population 0.55 + +// What ratio of the votes needs to be yes to pass? (1 = All votes need to be yes) +// min. 0 max. 1 +sv_vote_issue_botdifficulty_min_ratio 0.5 + +// Can people hold votes to change the gamemode? +sv_vote_issue_changegamemode_allowed 0 + +// Can people hold votes to change levels? +sv_vote_issue_changelevel_allowed 1 + +// If enabled, wait until the end of the round to change levels +sv_vote_issue_changelevel_wait 1 + +// Can people hold votes to kick players from the server? +sv_vote_issue_kick_allowed 1 + +// Can we kick the other team? +sv_vote_issue_kick_other_team 0 + +// Can people hold votes to set the next level? +sv_vote_issue_nextlevel_allowed 1 + +// Allow players to extend the current map? +sv_vote_issue_nextlevel_allowextend 0 + +// Present players with a list of maps to choose from? +sv_vote_issue_nextlevel_choicesmode 1 + +// Not allowed to vote for a nextlevel if one has already been set +sv_vote_issue_nextlevel_prevent_change 1 + +// How many rounds before map voting can begin +sv_vote_issue_nextlevel_round_count_delay 1 + +// The voting population required to pass a next level vote +// min. 0.1 max. 1 +sv_vote_issue_nextlevel_min_population 0.55 + +// How strong does the yes vote need to be to win? (2.0 = 2x more voters) +// min. 1 max. 5 +sv_vote_issue_nextlevel_min_ratio 0.5 + +// Can people hold votes to restart the game? +sv_vote_issue_restart_game_allowed 1 + +// Can people hold votes to restart the round? +sv_vote_issue_restart_round_allowed 1 + +// Can people hold votes to scramble the teams? +sv_vote_issue_scramble_teams_allowed 1 + +// Can people hold votes to switch the teams? +sv_vote_issue_switch_teams_allowed 1 + +// How long should a kick ban last for if a player is kicked for hacking? (minutes) +sv_vote_kick_ban_duration_cheating 240 + +// The voting population required to kick a person for hacking +// min. 0.1 max. 1 +sv_vote_kick_hack_min_population 0.60 + +// What ratio of the votes needs to be yes to pass? (1 = All votes need to be yes) +// min. 0 max. 1 +sv_vote_kick_hack_min_ratio 0.66 + +// How long should a kick vote ban someone from the server? (in minutes) +sv_vote_kick_ban_duration_idle 0 + +// The voting population required to kick a person for being idle +// min. 0.1 max. 1 +sv_vote_kick_idle_min_population 0.20 + +// What ratio of the votes needs to be yes to pass? (1 = All votes need to be yes) +// min. 0 max. 1 +sv_vote_kick_idle_min_ratio 0.5 + +// How long should a kick ban last for if a player is kicked for team killing? (minutes) +sv_vote_kick_ban_duration_teamkilling 10 + +// The voting population required to kick a person for team killing +// min. 0.1 max. 1 +sv_vote_kick_tk_min_population 0.25 + +// What ratio of the votes needs to be yes to pass? (1 = All votes need to be yes) +// min. 0 max. 1 +sv_vote_kick_tk_min_ratio 0.66 + +// How long should a kick ban last for if a player is kicked for trolling? (minutes) +sv_vote_kick_ban_duration_trolling 60 + +// The voting population required to kick a person for trolling +// min. 0.1 max. 1 +sv_vote_kick_troll_min_population 0.40 + +// What ratio of the votes needs to be yes to pass? (1 = All votes need to be yes) +// min. 0 max. 1 +sv_vote_kick_troll_min_ration 0.66 + +// The minimum number of players needed on the server to start a vote kick +sv_vote_kick_min_players 4 + +// Minimum number of vote attempts required to start an actual vote +sv_vote_kick_min_voters 3 + +// The voting population required +// min. 0 max. 1 +sv_vote_min_population 0.55 + +// What ratio of the votes needs to be yes to pass? (1 = All votes need to be yes) +// min. 0 max. 1 +sv_vote_min_ratio 0.55 // ............................. Fast Download .............................. // // info: Allows custom maps to be downloaded to the client. From 840c28011d1744734f3885f08a48da2fd3531e6f Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Wed, 6 Jan 2016 19:45:46 +0000 Subject: [PATCH 4/9] Added check_config.sh This function checks that servercfgfullpath exists and warns if missing --- functions/check.sh | 10 ++++++++-- functions/check_config.sh | 14 ++++++++++++++ functions/core_functions.sh | 7 ++++++- 3 files changed, 28 insertions(+), 3 deletions(-) create mode 100644 functions/check_config.sh diff --git a/functions/check.sh b/functions/check.sh index 909c04777..3456408cc 100644 --- a/functions/check.sh +++ b/functions/check.sh @@ -2,7 +2,7 @@ # LGSM fn_check function # Author: Daniel Gibbs # Website: http://gameservermanagers.com -lgsm_version="271215" +lgsm_version="060116" # Description: Overall function for managing checks. # Runs checks that will either halt on or fix an issue. @@ -59,4 +59,10 @@ do if [ "${allowed_command}" == "${function_selfname}" ]; then check_tmux.sh fi -done \ No newline at end of file +done + +if [ "${function_selfname}" != "command_install.sh" ]; then + if [ "${allowed_command}" == "${function_selfname}" ]; then + check_config.sh + fi +fi \ No newline at end of file diff --git a/functions/check_config.sh b/functions/check_config.sh new file mode 100644 index 000000000..782b6ec9e --- /dev/null +++ b/functions/check_config.sh @@ -0,0 +1,14 @@ +#!/bin/bash +# LGSM check_config.sh function +# Author: Daniel Gibbs +# Website: http://gameservermanagers.com +lgsm_version="060116" + +# Description: If server config missing warn user. + +if [ ! -e "${servercfgfullpath}" ]; then + if [ "${gamename}" != "Hurtworld" ]; then + fn_printwarnnl "Configuration file missing" + echo "${servercfgfullpath}" + fi +fi \ No newline at end of file diff --git a/functions/core_functions.sh b/functions/core_functions.sh index 698365058..7f97004ef 100644 --- a/functions/core_functions.sh +++ b/functions/core_functions.sh @@ -2,7 +2,7 @@ # LGSM core_functions.sh function # Author: Daniel Gibbs # Website: http://gameservermanagers.com -lgsm_version="030116" +lgsm_version="060116" # Description: Defines all functions to allow download and execution of functions using fn_runfunction. # This function is called first before any other function. Without this file other functions would not load. @@ -101,6 +101,11 @@ functionfile="${FUNCNAME}" fn_runfunction } +check_config.sh(){ +functionfile="${FUNCNAME}" +fn_runfunction +} + check_ip.sh(){ functionfile="${FUNCNAME}" fn_runfunction From 41513970f3ce645b8ee6ba9df40efb631982f75c Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Wed, 6 Jan 2016 20:00:30 +0000 Subject: [PATCH 5/9] Removed confi check from details --- functions/command_details.sh | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/functions/command_details.sh b/functions/command_details.sh index 6cf79674d..ef63a08f9 100644 --- a/functions/command_details.sh +++ b/functions/command_details.sh @@ -2,7 +2,7 @@ # LGSM command_details.sh function # Author: Daniel Gibbs # Website: http://gameservermanagers.com -lgsm_version="271215" +lgsm_version="060116" # Description: Displays server infomation. @@ -581,23 +581,6 @@ fn_details_statusbottom # Run checks and gathers details to display. check.sh - -if [ ! -e "${servercfgfullpath}" ]; then - if [ "${gamename}" != "Hurtworld" ]; then - echo "" - fn_printwarnnl "\e[0;31mCONFIGURATION FILE MISSING!\e[0m" - echo "${servercfgfullpath}" - echo "Some details cannot be displayed" - echo -en ".\r" - sleep 1 - echo -en "..\r" - sleep 1 - echo -en "...\r" - sleep 1 - echo -en " \r" - fi -fi - info_config.sh info_distro.sh info_glibc.sh From b276263dae5fc1d50a83df2cc6bfee4edf8c6944 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Wed, 6 Jan 2016 20:00:46 +0000 Subject: [PATCH 6/9] Monitor update check_config --- functions/check.sh | 4 +--- functions/check_config.sh | 3 +++ 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/functions/check.sh b/functions/check.sh index 3456408cc..fd8b57a30 100644 --- a/functions/check.sh +++ b/functions/check.sh @@ -62,7 +62,5 @@ do done if [ "${function_selfname}" != "command_install.sh" ]; then - if [ "${allowed_command}" == "${function_selfname}" ]; then - check_config.sh - fi + check_config.sh fi \ No newline at end of file diff --git a/functions/check_config.sh b/functions/check_config.sh index 782b6ec9e..8e2d6bc44 100644 --- a/functions/check_config.sh +++ b/functions/check_config.sh @@ -10,5 +10,8 @@ if [ ! -e "${servercfgfullpath}" ]; then if [ "${gamename}" != "Hurtworld" ]; then fn_printwarnnl "Configuration file missing" echo "${servercfgfullpath}" + fn_scriptlog "Configuration file missing" + fn_scriptlog "${servercfgfullpath}" + sleep 2 fi fi \ No newline at end of file From 742abe2d0952312ae48a3a6fd02a1ecbc6d41207 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Wed, 6 Jan 2016 20:07:25 +0000 Subject: [PATCH 7/9] ! --- functions/check_config.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/functions/check_config.sh b/functions/check_config.sh index 8e2d6bc44..e12d942c0 100644 --- a/functions/check_config.sh +++ b/functions/check_config.sh @@ -8,9 +8,9 @@ lgsm_version="060116" if [ ! -e "${servercfgfullpath}" ]; then if [ "${gamename}" != "Hurtworld" ]; then - fn_printwarnnl "Configuration file missing" + fn_printwarnnl "Configuration file missing!" echo "${servercfgfullpath}" - fn_scriptlog "Configuration file missing" + fn_scriptlog "Configuration file missing!" fn_scriptlog "${servercfgfullpath}" sleep 2 fi From 139c7e8aa6cced0499c0676cdc0d74dfc6708384 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Wed, 6 Jan 2016 20:14:35 +0000 Subject: [PATCH 8/9] Removed servercfgfullpath Moved this as causing issues with the new warning message. Now MISSING! is not displayed in the details. However this is still a warning before details are loaded. --- functions/info_config.sh | 32 +------------------------------- 1 file changed, 1 insertion(+), 31 deletions(-) diff --git a/functions/info_config.sh b/functions/info_config.sh index 0af342894..60d2d77e0 100644 --- a/functions/info_config.sh +++ b/functions/info_config.sh @@ -2,7 +2,7 @@ # LGSM info_config.sh function # Author: Daniel Gibbs # Website: http://gameservermanagers.com -lgsm_version="271215" +lgsm_version="060116" # Description: Gets specific details from config files. @@ -12,12 +12,6 @@ lgsm_version="271215" # tr -d '=\"; ' remove selected charectors =\"; # grep -v "foo" filter out lines that contain foo -fn_servercfgfullpath(){ -if [ ! -f "${servercfgfullpath}" ]; then - servercfgfullpath="\e[0;31mMISSING!\e[0m ${servercfgfullpath}" -fi -} - ## Just Cause 2 if [ "${engine}" == "avalanche" ]; then @@ -68,8 +62,6 @@ if [ "${engine}" == "avalanche" ]; then port="0" fi - fn_servercfgfullpath - ## Dont Starve Together elif [ "${engine}" == "dontstarve" ]; then @@ -131,8 +123,6 @@ elif [ "${engine}" == "dontstarve" ]; then port="0" fi - fn_servercfgfullpath - ## Project Zomboid elif [ "${engine}" == "projectzomboid" ]; then @@ -164,8 +154,6 @@ elif [ "${engine}" == "projectzomboid" ]; then port="0" fi - fn_servercfgfullpath - # ARMA 3 elif [ "${engine}" == "realvirtuality" ]; then @@ -233,8 +221,6 @@ elif [ "${engine}" == "realvirtuality" ]; then masterport="0" fi - fn_servercfgfullpath - # Serious Sam elif [ "${engine}" == "seriousengine35" ]; then @@ -294,8 +280,6 @@ elif [ "${engine}" == "seriousengine35" ]; then queryport="0" fi - fn_servercfgfullpath - # Source Engine Games elif [ "${engine}" == "source" ]||[ "${engine}" == "goldsource" ]; then @@ -329,8 +313,6 @@ elif [ "${engine}" == "source" ]||[ "${engine}" == "goldsource" ]; then rconpassword="\e[0;31mUNAVAILABLE\e[0m" fi - fn_servercfgfullpath - # Spark (NS2: Combat) elif [ "${engine}" == "spark" ]; then @@ -342,8 +324,6 @@ elif [ "${engine}" == "spark" ]; then queryport="0" fi - fn_servercfgfullpath - # Teamspeak 3 elif [ "${gamename}" == "Teamspeak 3" ]; then @@ -390,8 +370,6 @@ elif [ "${gamename}" == "Teamspeak 3" ]; then fileport="30033" fi - fn_servercfgfullpath - # Teeworlds elif [ "${engine}" == "teeworlds" ]; then @@ -443,8 +421,6 @@ elif [ "${engine}" == "teeworlds" ]; then slots="12" fi - fn_servercfgfullpath - # Terraria elif [ "${engine}" == "terraria" ]; then @@ -591,8 +567,6 @@ elif [ "${gamename}" == "7 Days To Die" ]; then queryport="0" fi - fn_servercfgfullpath - # Hurtworld (unity3d) elif [ "${gamename}" == "Hurtworld" ]; then @@ -763,8 +737,6 @@ elif [ "${engine}" == "unreal" ]||[ "${engine}" == "unreal2" ]; then fi - fn_servercfgfullpath - # ARK: Survivaial Evolved elif [ "${gamename}" == "ARK: Survivial Evolved" ]; then @@ -832,6 +804,4 @@ elif [ "${gamename}" == "ARK: Survivial Evolved" ]; then queryport="0" fi - fn_servercfgfullpath - fi From 37c3f7f2e27414c698e592598bce76d3a855a697 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Wed, 6 Jan 2016 20:23:28 +0000 Subject: [PATCH 9/9] Adjusted to run on specific commands --- functions/check.sh | 10 +++++++--- functions/check_config.sh | 2 +- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/functions/check.sh b/functions/check.sh index fd8b57a30..86e141416 100644 --- a/functions/check.sh +++ b/functions/check.sh @@ -61,6 +61,10 @@ do fi done -if [ "${function_selfname}" != "command_install.sh" ]; then - check_config.sh -fi \ No newline at end of file +local allowed_commands_array=( command_console.sh command_debug.sh command_details.sh command_monitor.sh command_start.sh command_stop.sh ) +for allowed_command in "${allowed_commands_array[@]}" +do + if [ "${allowed_command}" == "${function_selfname}" ]; then + check_config.sh + fi +done \ No newline at end of file diff --git a/functions/check_config.sh b/functions/check_config.sh index e12d942c0..24d32318f 100644 --- a/functions/check_config.sh +++ b/functions/check_config.sh @@ -8,7 +8,7 @@ lgsm_version="060116" if [ ! -e "${servercfgfullpath}" ]; then if [ "${gamename}" != "Hurtworld" ]; then - fn_printwarnnl "Configuration file missing!" + fn_printwarnnl "Config file missing!" echo "${servercfgfullpath}" fn_scriptlog "Configuration file missing!" fn_scriptlog "${servercfgfullpath}"