elif["${gamename}"=="Battlefield: 1942"]||["${gamename}"=="Call of Duty"]||["${gamename}"=="Call of Duty: United Offensive"]||["${gamename}"=="Call of Duty 2"]||["${gamename}"=="Call of Duty 4"]||["${gamename}"=="Call of Duty: World at War"]||["${gamename}"=="Factorio"]||["${gamename}"=="Minecraft"]||["${gamename}"=="Multi Theft Auto"]||["${gamename}"=="Quake 2"]||["${gamename}"=="Quake 3: Arena"]||["${gamename}"=="QuakeWorld"]||["${gamename}"=="Unreal Tournament 99"]||["${gamename}"=="Unreal Tournament"]||["${gamename}"=="Unreal Tournament 3"]||["${gamename}"=="TeamSpeak 3"]||["${gamename}"=="Mumble"]||["${gamename}"=="Wolfenstein: Enemy Territory"];then
# tmux pipe-pane not supported in tmux versions < 1.6
if["$(tmux -V|sed "s/tmux //"|sed -n '1 p'|tr -cd '[:digit:]')" -lt "16"] 2>/dev/null;then# Tmux compiled from source will not return a number, therefore bypass this check and trash the error
# Attempts graceful of mta using rcon 'quit' command.
fn_stop_graceful_mta(){
fn_print_dots "Graceful: sending \"quit\""
fn_script_log_info "Graceful: sending \"quit\""
# sends quit
tmux send -t "${servicename}" quit ENTER > /dev/null 2>&1
# waits up to 120 seconds giving the server time to shutdown gracefuly, we need a long wait time here as resources are stopped individually and process their own shutdowns
elif["${engine}"=="source"]||["${engine}"=="quake"]||["${engine}"=="idtech2"]||["${engine}"=="idtech3"]||["${engine}"=="idtech3_ql"]||["${engine}"=="Just Cause 2"];then
fn_stop_graceful_quit
elif["${engine}"=="source"]||["${engine}"=="quake"]||["${engine}"=="idtech2"]||["${engine}"=="idtech3"]||["${engine}"=="idtech3_ql"]||["${engine}"=="Just Cause 2"]||["${engine}"=="projectzomboid"];then
# Fixes: ./dontstarve_dedicated_server_nullrenderer: ./lib32/libcurl-gnutls.so.4: no version information available (required by ./dontstarve_dedicated_server_nullrenderer)
# Issue only occures on CentOS as libcurl-gnutls.so.4 is called libcurl.so.4 on CentOS.