feat(new server): Quake 4 (#4398)

This commit is contained in:
Daniel Gibbs 2023-11-30 21:21:11 +00:00 committed by GitHub
parent 746c413314
commit 38079bac84
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
27 changed files with 256 additions and 1 deletions

View File

@ -0,0 +1,186 @@
##################################
######## Default Settings ########
##################################
# DO NOT EDIT, ANY CHANGES WILL BE OVERWRITTEN!
# Copy settings from here and use them in either:
# common.cfg - applies settings to every instance.
# [instance].cfg - applies settings to a specific instance.
#### Game Server Settings ####
## SteamCMD Login | https://docs.linuxgsm.com/steamcmd#steamcmd-login
steamuser="username"
steampass='password'
## Predefined Parameters | https://docs.linuxgsm.com/configuration/start-parameters
port="28004"
## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters
startparameters="+set sv_punkbuster 0 +set fs_basepath ${serverfiles} +set net_port ${port} +exec ${servercfg}"
#### LinuxGSM Settings ####
## LinuxGSM Stats
# Send useful stats to LinuxGSM developers.
# https://docs.linuxgsm.com/configuration/linuxgsm-stats
# (on|off)
stats="off"
## Notification Alerts
# (on|off)
# Display IP | https://docs.linuxgsm.com/alerts#display-ip
displayip=""
# More info | https://docs.linuxgsm.com/alerts#more-info
postalert="off"
# Alert on Start/Stop/Restart
statusalert="off"
# Discord Alerts | https://docs.linuxgsm.com/alerts/discord
discordalert="off"
discordwebhook="webhook"
# Email Alerts | https://docs.linuxgsm.com/alerts/email
emailalert="off"
email="email@example.com"
emailfrom=""
# Gotify Alerts | https://docs.linuxgsm.com/alerts/gotify
gotifyalert="off"
gotifytoken="token"
gotifywebhook="webhook"
# IFTTT Alerts | https://docs.linuxgsm.com/alerts/ifttt
iftttalert="off"
ifttttoken="accesstoken"
iftttevent="linuxgsm_alert"
# Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet
pushbulletalert="off"
pushbullettoken="accesstoken"
channeltag=""
# Pushover Alerts | https://docs.linuxgsm.com/alerts/pushover
pushoveralert="off"
pushovertoken="accesstoken"
pushoveruserkey="userkey"
# Rocket.Chat Alerts | https://docs.linuxgsm.com/alerts/rocket.chat
rocketchatalert="off"
rocketchatwebhook="webhook"
# Slack Alerts | https://docs.linuxgsm.com/alerts/slack
slackalert="off"
slackwebhook="webhook"
# Telegram Alerts | https://docs.linuxgsm.com/alerts/telegram
# You can add a custom cURL string eg proxy (useful in Russia) in "curlcustomstring".
# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help".
telegramapi="api.telegram.org"
telegramalert="off"
telegramtoken="accesstoken"
telegramchatid=""
curlcustomstring=""
## Updating | https://docs.linuxgsm.com/commands/update
updateonstart="off"
## Backup | https://docs.linuxgsm.com/commands/backup
maxbackups="4"
maxbackupdays="30"
stoponbackup="on"
## Logging | https://docs.linuxgsm.com/features/logging
consolelogging="on"
logdays="7"
## Monitor | https://docs.linuxgsm.com/commands/monitor
# Query delay time
querydelay="1"
## ANSI Colors | https://docs.linuxgsm.com/features/ansi-colors
ansi="on"
#### Advanced Settings ####
## Message Display Time | https://docs.linuxgsm.com/features/message-display-time
sleeptime="0.5"
## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd
# Server appid
appid="2210"
steamcmdforcewindows="yes"
# SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch
branch=""
betapassword=""
# Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server
steammaster="false"
## Stop Mode | https://docs.linuxgsm.com/features/stop-mode
# 1: tmux kill
# 2: CTRL+c
# 3: quit
# 4: quit 120s
# 5: stop
# 6: q
# 7: exit
# 8: 7 Days to Die
# 9: GoldSrc
# 10: Avorion
# 11: end
stopmode="3"
## Query mode
# 1: session only
# 2: gamedig (gsquery fallback)
# 3: gamedig
# 4: gsquery
# 5: tcp
querymode="2"
querytype="quake4"
## Console type
consoleverbose="yes"
consoleinteract="yes"
## Game Server Details
# Do not edit
gamename="Quake 4"
engine="idtech3_ql"
glibc="2.15"
#### Directories ####
# Edit with care
## Game Server Directories
systemdir="${serverfiles}"
executabledir="${serverfiles}"
executable="./quake4-dedicated"
servercfgdir="${systemdir}/q4base"
servercfg="${selfname}.cfg"
servercfgdefault="server.cfg"
servercfgfullpath="${servercfgdir}/${servercfg}"
## Backup Directory
backupdir="${lgsmdir}/backup"
## Logging Directories
[ -n "${LGSM_LOGDIR}" ] && logdir="${LGSM_LOGDIR}" || logdir="${rootdir}/log"
gamelogdir="${logdir}/server"
lgsmlogdir="${logdir}/script"
consolelogdir="${logdir}/console"
gamelog="${gamelogdir}/${selfname}-game.log"
lgsmlog="${lgsmlogdir}/${selfname}-script.log"
consolelog="${consolelogdir}/${selfname}-console.log"
alertlog="${lgsmlogdir}/${selfname}-alert.log"
postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log"
## Logs Naming
lgsmlogdate="${lgsmlogdir}/${selfname}-script-$(date '+%Y-%m-%d-%H:%M:%S').log"
consolelogdate="${consolelogdir}/${selfname}-console-$(date '+%Y-%m-%d-%H:%M:%S').log"
## Log Parameters
logtimestamp="off"
logtimestampformat="%Y-%m-%d %H:%M:%S"

View File

@ -89,6 +89,7 @@ pvr,libcxx
pz,java-11-openjdk rng-tools
q2
q3
q4
ql
qw
ricochet

1 all,bc,binutils,bzip2,cpio,curl,epel-release,file,glibc.i686,gzip,hostname,jq,libstdc++,libstdc++.i686,nmap-ncat,python36,tar,tmux,unzip,util-linux,wget,xz
89 pz,java-11-openjdk rng-tools
90 q2
91 q3
92 q4
93 ql
94 qw
95 ricochet

View File

@ -89,6 +89,7 @@ pvr,libcxx
pz,java-11-openjdk rng-tools
q2
q3
q4
ql
qw
ricochet

1 all,bc,binutils,bzip2,cpio,curl,epel-release,file,glibc.i686,gzip,hostname,jq,libstdc++,libstdc++.i686,nmap-ncat,python3,tar,tmux,unzip,util-linux,wget,xz
89 pz,java-11-openjdk rng-tools
90 q2
91 q3
92 q4
93 ql
94 qw
95 ricochet

View File

@ -89,6 +89,7 @@ pvr,libcxx
pz,java-11-openjdk rng-tools
q2
q3
q4
ql
qw
ricochet

1 all,bc,binutils,bzip2,cpio,curl,epel-release,file,glibc.i686,gzip,hostname,jq,libstdc++,libstdc++.i686,nmap-ncat,python3,tar,tmux,unzip,util-linux,wget,xz
89 pz,java-11-openjdk rng-tools
90 q2
91 q3
92 q4
93 ql
94 qw
95 ricochet

View File

@ -89,6 +89,7 @@ pvr,libcxx
pz,java-11-openjdk rng-tools
q2
q3
q4
ql
qw
ricochet

1 all,bc,binutils,bzip2,cpio,curl,epel-release,file,glibc.i686,gzip,hostname,jq,libstdc++,libstdc++.i686,nmap-ncat,python36,tar,tmux,unzip,util-linux,wget,xz
89 pz,java-11-openjdk rng-tools
90 q2
91 q3
92 q4
93 ql
94 qw
95 ricochet

View File

@ -89,6 +89,7 @@ pvr,libcxx
pz,java-11-openjdk rng-tools
q2
q3
q4
ql
qw
ricochet

1 all,bc,binutils,bzip2,cpio,curl,epel-release,file,glibc.i686,gzip,hostname,jq,libstdc++,libstdc++.i686,nmap-ncat,python3,tar,tmux,unzip,util-linux,wget,xz
89 pz,java-11-openjdk rng-tools
90 q2
91 q3
92 q4
93 ql
94 qw
95 ricochet

View File

@ -89,6 +89,7 @@ pvr,libc++1
pz,openjdk-11-jre,rng-tools
q2
q3
q4
ql
qw
ricochet

1 all,bc,binutils,bsdmainutils,bzip2,ca-certificates,cpio,curl,distro-info,file,gzip,hostname,jq,lib32gcc1,lib32stdc++6,netcat,python3,tar,tmux,unzip,util-linux,uuid-runtime,wget,xz-utils
89 pz,openjdk-11-jre,rng-tools
90 q2
91 q3
92 q4
93 ql
94 qw
95 ricochet

View File

@ -89,6 +89,7 @@ pvr,libc++1
pz,openjdk-17-jre,rng-tools
q2
q3
q4
ql
qw
ricochet

1 all,bc,binutils,bsdmainutils,bzip2,ca-certificates,cpio,curl,distro-info,file,gzip,hostname,jq,lib32gcc-s1,lib32stdc++6,netcat,python3,tar,tmux,unzip,util-linux,uuid-runtime,wget,xz-utils
89 pz,openjdk-17-jre,rng-tools
90 q2
91 q3
92 q4
93 ql
94 qw
95 ricochet

View File

@ -89,6 +89,7 @@ pvr,libc++1
pz,openjdk-17-jre,rng-tools5
q2
q3
q4
ql
qw
ricochet

1 all,bc,binutils,bsdmainutils,bzip2,ca-certificates,cpio,curl,distro-info,file,gzip,hostname,jq,lib32gcc-s1,lib32stdc++6,netcat-openbsd,python3,tar,tmux,unzip,util-linux,uuid-runtime,wget,xz-utils
89 pz,openjdk-17-jre,rng-tools5
90 q2
91 q3
92 q4
93 ql
94 qw
95 ricochet

View File

@ -89,6 +89,7 @@ pvr,libc++1
pz,openjdk-8-jre,rng-tools
q2
q3
q4
ql
qw
ricochet

1 all,bc,binutils,bsdmainutils,bzip2,ca-certificates,cpio,curl,distro-info,file,gzip,hostname,jq,lib32gcc1,lib32stdc++6,netcat,python3,tar,tmux,unzip,util-linux,wget,xz-utils
89 pz,openjdk-8-jre,rng-tools
90 q2
91 q3
92 q4
93 ql
94 qw
95 ricochet

Binary file not shown.

After

Width:  |  Height:  |  Size: 786 B

View File

@ -89,6 +89,7 @@ pvr,libcxx
pz,java-11-openjdk rng-tools
q2
q3
q4
ql
qw
ricochet

1 all,bc,binutils,bzip2,cpio,curl,epel-release,file,glibc.i686,gzip,hostname,jq,libstdc++,libstdc++.i686,nmap-ncat,python36,tar,tmux,unzip,util-linux,wget,xz
89 pz,java-11-openjdk rng-tools
90 q2
91 q3
92 q4
93 ql
94 qw
95 ricochet

View File

@ -89,6 +89,7 @@ pvr,libcxx
pz,java-11-openjdk rng-tools
q2
q3
q4
ql
qw
ricochet

1 all,bc,binutils,bzip2,cpio,curl,epel-release,file,glibc.i686,gzip,hostname,jq,libstdc++,libstdc++.i686,nmap-ncat,python36,tar,tmux,unzip,util-linux,wget,xz
89 pz,java-11-openjdk rng-tools
90 q2
91 q3
92 q4
93 ql
94 qw
95 ricochet

View File

@ -89,6 +89,7 @@ pvr,libcxx
pz,java-11-openjdk rng-tools
q2
q3
q4
ql
qw
ricochet

1 all,bc,binutils,bzip2,cpio,curl,epel-release,file,glibc.i686,gzip,hostname,jq,libstdc++,libstdc++.i686,nmap-ncat,python3,tar,tmux,unzip,util-linux,wget,xz
89 pz,java-11-openjdk rng-tools
90 q2
91 q3
92 q4
93 ql
94 qw
95 ricochet

View File

@ -89,6 +89,7 @@ pvr,libcxx
pz,java-11-openjdk rng-tools
q2
q3
q4
ql
qw
ricochet

1 all,bc,binutils,bzip2,cpio,curl,epel-release,file,glibc.i686,gzip,hostname,jq,libstdc++,libstdc++.i686,nmap-ncat,python36,tar,tmux,unzip,util-linux,wget,xz
89 pz,java-11-openjdk rng-tools
90 q2
91 q3
92 q4
93 ql
94 qw
95 ricochet

View File

@ -89,6 +89,7 @@ pvr,libcxx
pz,java-11-openjdk rng-tools
q2
q3
q4
ql
qw
ricochet

1 all,bc,binutils,bzip2,cpio,curl,epel-release,file,glibc.i686,gzip,hostname,jq,libstdc++,libstdc++.i686,nmap-ncat,python3,tar,tmux,unzip,util-linux,wget,xz
89 pz,java-11-openjdk rng-tools
90 q2
91 q3
92 q4
93 ql
94 qw
95 ricochet

View File

@ -87,6 +87,7 @@ pvr,pvrserver,Pavlov VR,ubuntu-22.04
pz,pzserver,Project Zomboid,ubuntu-22.04
q2,q2server,Quake 2,ubuntu-22.04
q3,q3server,Quake 3: Arena,ubuntu-22.04
q4,q4server,Quake 4,ubuntu-22.04
ql,qlserver,Quake Live,ubuntu-22.04
qw,qwserver,Quake World,ubuntu-22.04
ricochet,ricochetserver,Ricochet,ubuntu-22.04

1 shortname gameservername gamename os
87 pz pzserver Project Zomboid ubuntu-22.04
88 q2 q2server Quake 2 ubuntu-22.04
89 q3 q3server Quake 3: Arena ubuntu-22.04
90 q4 q4server Quake 4 ubuntu-22.04
91 ql qlserver Quake Live ubuntu-22.04
92 qw qwserver Quake World ubuntu-22.04
93 ricochet ricochetserver Ricochet ubuntu-22.04

View File

@ -89,6 +89,7 @@ pvr,libc++1
pz,openjdk-8-jre,rng-tools
q2
q3
q4
ql
qw
ricochet

1 all,bc,binutils,bsdmainutils,bzip2,ca-certificates,cpio,curl,file,gzip,hostname,jq,lib32gcc1,lib32stdc++6,netcat,python3,tar,tmux,unzip,util-linux,uuid-runtime,wget,xz-utils
89 pz,openjdk-8-jre,rng-tools
90 q2
91 q3
92 q4
93 ql
94 qw
95 ricochet

View File

@ -89,6 +89,7 @@ pvr,libc++1
pz,openjdk-11-jre,rng-tools
q2
q3
q4
ql
qw
ricochet

1 all,bc,binutils,bsdmainutils,bzip2,ca-certificates,cpio,curl,distro-info,file,gzip,hostname,jq,lib32gcc1,lib32stdc++6,netcat,python3,tar,tmux,unzip,util-linux,uuid-runtime,wget,xz-utils
89 pz,openjdk-11-jre,rng-tools
90 q2
91 q3
92 q4
93 ql
94 qw
95 ricochet

View File

@ -89,6 +89,7 @@ pvr,libc++1
pz,openjdk-17-jre,rng-tools
q2
q3
q4
ql
qw
ricochet

1 all,bc,binutils,bsdmainutils,bzip2,ca-certificates,cpio,curl,distro-info,file,gzip,hostname,jq,lib32gcc1,lib32stdc++6,netcat,python3,tar,tmux,unzip,util-linux,uuid-runtime,wget,xz-utils
89 pz,openjdk-17-jre,rng-tools
90 q2
91 q3
92 q4
93 ql
94 qw
95 ricochet

View File

@ -89,6 +89,7 @@ pvr,libc++1
pz,openjdk-17-jre,rng-tools5
q2
q3
q4
ql
qw
ricochet

1 all,bc,binutils,bsdmainutils,bzip2,ca-certificates,cpio,curl,distro-info,file,gzip,hostname,jq,lib32gcc-s1,lib32stdc++6,netcat,python3,tar,tmux,unzip,util-linux,uuid-runtime,wget,xz-utils
89 pz,openjdk-17-jre,rng-tools5
90 q2
91 q3
92 q4
93 ql
94 qw
95 ricochet

View File

@ -89,6 +89,7 @@ pvr,libc++1
pz,openjdk-17-jre,rng-tools5
q2
q3
q4
ql
qw
ricochet

1 all,bc,binutils,bsdmainutils,bzip2,ca-certificates,cpio,curl,distro-info,file,gzip,hostname,jq,lib32gcc-s1,lib32stdc++6,netcat-openbsd,python3,tar,tmux,unzip,util-linux,uuid-runtime,wget,xz-utils
89 pz,openjdk-17-jre,rng-tools5
90 q2
91 q3
92 q4
93 ql
94 qw
95 ricochet

View File

@ -89,6 +89,7 @@ pvr,libc++1
pz,openjdk-17-jre,rng-tools5
q2
q3
q4
ql
qw
ricochet

1 all,bc,binutils,bsdmainutils,bzip2,ca-certificates,cpio,curl,distro-info,file,gzip,hostname,jq,lib32gcc-s1,lib32stdc++6,netcat-openbsd,python3,tar,tmux,unzip,util-linux,uuid-runtime,wget,xz-utils
89 pz,openjdk-17-jre,rng-tools5
90 q2
91 q3
92 q4
93 ql
94 qw
95 ricochet

View File

@ -1685,6 +1685,25 @@ fn_info_game_q3() {
defaultmap="${defaultmap:-"NOT SET"}"
}
# Config Type: QuakeC
# Comment: // or /* */
# fn_info_game_quakec "SERVERNAME"
# Filetype: cfg
fn_info_game_q4() {
if [ -f "${servercfgfullpath}" ]; then
fn_info_game_quakec "maxplayers" "sv_maxclients"
fn_info_game_quakec "rconpassword" "net_serverRemoteConsolePassword"
fn_info_game_quakec "servername" "si_name"
fn_info_game_quakec "serverpassword" "g_password"
fi
maxplayers="${maxplayers:-"0"}"
rconpassword="${rconpassword:-"NOT SET"}"
servername="${servername:-"NOT SET"}"
port="${port:-"0"}"
queryport="${port}"
defaultmap="${defaultmap:-"NOT SET"}"
}
# Config Type: QuakeC
# Comment: // or /* */
# Example: set sv_hostname "SERVERNAME"
@ -2346,6 +2365,8 @@ elif [ "${shortname}" == "q2" ]; then
fn_info_game_q2
elif [ "${shortname}" == "q3" ]; then
fn_info_game_q3
elif [ "${shortname}" == "q4" ]; then
fn_info_game_q4
elif [ "${shortname}" == "ql" ]; then
fn_info_game_ql
elif [ "${shortname}" == "qw" ]; then

View File

@ -694,6 +694,8 @@ fn_info_messages_ports() {
portcommand="ss -tuplwn | grep bf1942_lnxded"
elif [ "${shortname}" == "dayz" ]; then
portcommand="ss -tuplwn | grep enfMain"
elif [ "${shortname}" == "q4" ]; then
portcommand="ss -tuplwn | grep q4ded.x86"
elif [ "${shortname}" == "mc" ] || [ "${shortname}" == "nec" ] || [ "${shortname}" == "pmc" ] || [ "${shortname}" == "vpmc" ] || [ "${shortname}" == "wmc" ]; then
portcommand="ss -tuplwn | grep java"
elif [ "${shortname}" == "terraria" ]; then
@ -1286,6 +1288,7 @@ fn_info_messages_q2() {
{
fn_port "header"
fn_port "Game" port udp
fn_port "Query" queryport udp
} | column -s $'\t' -t
}
@ -1293,6 +1296,15 @@ fn_info_messages_q3() {
{
fn_port "header"
fn_port "Game" port udp
fn_port "Query" queryport udp
} | column -s $'\t' -t
}
fn_info_messages_q4() {
{
fn_port "header"
fn_port "Game" port udp
fn_port "Query" queryport udp
} | column -s $'\t' -t
}
@ -1792,6 +1804,8 @@ fn_info_messages_select_engine() {
fn_info_messages_q2
elif [ "${shortname}" == "q3" ]; then
fn_info_messages_q3
elif [ "${shortname}" == "q4" ]; then
fn_info_messages_q3
elif [ "${shortname}" == "ql" ]; then
fn_info_messages_ql
elif [ "${shortname}" == "qw" ]; then

View File

@ -634,6 +634,12 @@ elif [ "${shortname}" == "q2" ]; then
fn_set_config_vars
fn_list_config_locations
elif [ "${shortname}" == "q3" ]; then
array_configs+=(server.cfg)
fn_fetch_default_configs
fn_default_config_remote
fn_set_config_vars
fn_list_config_locations
elif [ "${shortname}" == "q4" ]; then
array_configs+=(server.cfg)
fn_fetch_default_config
fn_default_config_remote

View File

@ -106,6 +106,13 @@ fn_install_server_files() {
chmodx="nochmodx" run="norun"
force="noforce"
md5="b0e26d8919fe9313fb9d8ded2360f3db"
elif [ "${shortname}" == "q4" ]; then
remote_fileurl="http://linuxgsm.download/Quake4/quake4-1.4.2-x86-linuxded.tar.xz"
local_filedir="${tmpdir}"
local_filename="quake4-1.4.2-x86-linuxded.tar.xz"
chmodx="nochmodx" run="norun"
force="noforce"
md5="afe30b44f23c8ae2ce6f0f464473d8ba"
elif [ "${shortname}" == "qw" ]; then
remote_fileurl="http://linuxgsm.download/QuakeWorld/nquake.server.linux.190506.full.tar.xz"
local_filedir="${tmpdir}"
@ -240,7 +247,7 @@ elif [ "${shortname}" == "vints" ]; then
elif [ "${shortname}" == "ut99" ]; then
fn_install_server_files
update_ut99.sh
elif [ -z "${appid}" ] || [ "${shortname}" == "ahl" ] || [ "${shortname}" == "bb" ] || [ "${shortname}" == "ns" ] || [ "${shortname}" == "sfc" ] || [ "${shortname}" == "ts" ] || [ "${shortname}" == "vs" ] || [ "${shortname}" == "zmr" ]; then
elif [ -z "${appid}" ] || [ "${shortname}" == "ahl" ] || [ "${shortname}" == "bb" ] || [ "${shortname}" == "q4" ] || [ "${shortname}" == "ns" ] || [ "${shortname}" == "sfc" ] || [ "${shortname}" == "ts" ] || [ "${shortname}" == "vs" ] || [ "${shortname}" == "zmr" ]; then
if [ "${shortname}" == "ut" ]; then
install_eula.sh
fi