Skip to content

Commit

Permalink
feat(new server): Quake 4 (#4398)
Browse files Browse the repository at this point in the history
  • Loading branch information
dgibbs64 authored Nov 30, 2023
1 parent 746c413 commit 38079ba
Show file tree
Hide file tree
Showing 27 changed files with 256 additions and 1 deletion.
186 changes: 186 additions & 0 deletions lgsm/config-default/config-lgsm/q4server/_default.cfg
Original file line number Diff line number Diff line change
@@ -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 protected]"
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"
1 change: 1 addition & 0 deletions lgsm/data/almalinux-8.csv
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ pvr,libcxx
pz,java-11-openjdk rng-tools
q2
q3
q4
ql
qw
ricochet
Expand Down
1 change: 1 addition & 0 deletions lgsm/data/almalinux-9.csv
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ pvr,libcxx
pz,java-11-openjdk rng-tools
q2
q3
q4
ql
qw
ricochet
Expand Down
1 change: 1 addition & 0 deletions lgsm/data/centos-7.csv
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ pvr,libcxx
pz,java-11-openjdk rng-tools
q2
q3
q4
ql
qw
ricochet
Expand Down
1 change: 1 addition & 0 deletions lgsm/data/centos-8.csv
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ pvr,libcxx
pz,java-11-openjdk rng-tools
q2
q3
q4
ql
qw
ricochet
Expand Down
1 change: 1 addition & 0 deletions lgsm/data/centos-9.csv
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ pvr,libcxx
pz,java-11-openjdk rng-tools
q2
q3
q4
ql
qw
ricochet
Expand Down
1 change: 1 addition & 0 deletions lgsm/data/debian-10.csv
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ pvr,libc++1
pz,openjdk-11-jre,rng-tools
q2
q3
q4
ql
qw
ricochet
Expand Down
1 change: 1 addition & 0 deletions lgsm/data/debian-11.csv
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ pvr,libc++1
pz,openjdk-17-jre,rng-tools
q2
q3
q4
ql
qw
ricochet
Expand Down
1 change: 1 addition & 0 deletions lgsm/data/debian-12.csv
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ pvr,libc++1
pz,openjdk-17-jre,rng-tools5
q2
q3
q4
ql
qw
ricochet
Expand Down
1 change: 1 addition & 0 deletions lgsm/data/debian-9.csv
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ pvr,libc++1
pz,openjdk-8-jre,rng-tools
q2
q3
q4
ql
qw
ricochet
Expand Down
Binary file added lgsm/data/gameicons/q4-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions lgsm/data/rhel-7.csv
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ pvr,libcxx
pz,java-11-openjdk rng-tools
q2
q3
q4
ql
qw
ricochet
Expand Down
1 change: 1 addition & 0 deletions lgsm/data/rhel-8.csv
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ pvr,libcxx
pz,java-11-openjdk rng-tools
q2
q3
q4
ql
qw
ricochet
Expand Down
1 change: 1 addition & 0 deletions lgsm/data/rhel-9.csv
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ pvr,libcxx
pz,java-11-openjdk rng-tools
q2
q3
q4
ql
qw
ricochet
Expand Down
1 change: 1 addition & 0 deletions lgsm/data/rocky-8.csv
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ pvr,libcxx
pz,java-11-openjdk rng-tools
q2
q3
q4
ql
qw
ricochet
Expand Down
1 change: 1 addition & 0 deletions lgsm/data/rocky-9.csv
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ pvr,libcxx
pz,java-11-openjdk rng-tools
q2
q3
q4
ql
qw
ricochet
Expand Down
1 change: 1 addition & 0 deletions lgsm/data/serverlist.csv
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions lgsm/data/ubuntu-16.04.csv
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ pvr,libc++1
pz,openjdk-8-jre,rng-tools
q2
q3
q4
ql
qw
ricochet
Expand Down
1 change: 1 addition & 0 deletions lgsm/data/ubuntu-18.04.csv
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ pvr,libc++1
pz,openjdk-11-jre,rng-tools
q2
q3
q4
ql
qw
ricochet
Expand Down
1 change: 1 addition & 0 deletions lgsm/data/ubuntu-20.04.csv
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ pvr,libc++1
pz,openjdk-17-jre,rng-tools
q2
q3
q4
ql
qw
ricochet
Expand Down
1 change: 1 addition & 0 deletions lgsm/data/ubuntu-22.04.csv
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ pvr,libc++1
pz,openjdk-17-jre,rng-tools5
q2
q3
q4
ql
qw
ricochet
Expand Down
1 change: 1 addition & 0 deletions lgsm/data/ubuntu-23.04.csv
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ pvr,libc++1
pz,openjdk-17-jre,rng-tools5
q2
q3
q4
ql
qw
ricochet
Expand Down
1 change: 1 addition & 0 deletions lgsm/data/ubuntu-23.10.csv
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ pvr,libc++1
pz,openjdk-17-jre,rng-tools5
q2
q3
q4
ql
qw
ricochet
Expand Down
21 changes: 21 additions & 0 deletions lgsm/modules/info_game.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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
Expand Down
Loading

0 comments on commit 38079ba

Please sign in to comment.