Просмотр исходного кода

Merge remote-tracking branch 'refs/remotes/origin/master' into ts3-password

# Conflicts:
#	functions/core_functions.sh
Daniel Gibbs 10 лет назад
Родитель
Сommit
64a8652709

+ 178 - 5
Insurgency/cfg/lgsm-default.cfg

@@ -1,7 +1,7 @@
 // ****************************************************************************
 //                                                                            *
 //     Ingurgency - server.cfg                                                *
-//     Version 150815                                                         *
+//     Version 060116                                                         *
 //                                                                            *
 // ****************************************************************************
 
@@ -10,9 +10,6 @@
 // Hostname for server.
 hostname "<hostname>"
 
-// RCON - remote console password.
-rcon_password "<rconpassword>"
-
 // 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 "<rconpassword>"
+
+// 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. 
@@ -59,6 +72,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 +92,165 @@ sv_playlist "nwi/coop"
 //
 //mapcyclefile "mapcycle.txt"
 
+// .......................... 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
+
+// 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.
 

+ 9 - 1
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,12 @@ do
 	if [ "${allowed_command}" == "${function_selfname}" ]; then
 		check_tmux.sh
 	fi
+done
+
+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

+ 17 - 0
functions/check_config.sh

@@ -0,0 +1,17 @@
+#!/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 "Config file missing!"
+		echo "${servercfgfullpath}"
+		fn_scriptlog "Configuration file missing!"
+		fn_scriptlog "${servercfgfullpath}"
+		sleep 2
+	fi
+fi

+ 1 - 18
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

+ 6 - 1
functions/core_functions.sh

@@ -2,7 +2,7 @@
 # LGSM core_functions.sh function
 # Author: Daniel Gibbs
 # Website: http://gameservermanagers.com
-lgsm_version="050116"
+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.
@@ -106,6 +106,11 @@ functionfile="${FUNCNAME}"
 fn_runfunction
 }
 
+check_config.sh(){
+functionfile="${FUNCNAME}"
+fn_runfunction
+}
+
 check_ip.sh(){
 functionfile="${FUNCNAME}"
 fn_runfunction

+ 1 - 31
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