소스 검색

feat(new server): Counter Strike 2 (#4356)

* cs2

* config

* fix: remove lo code

* config

* params

* source2

* game info

* messages

* config changes

* dirs

* config

* refactor: refactor info message functions in alert.sh, command_details.sh, command_dev_query_raw.sh, and command_postdetails.sh

- Refactored the info message functions in multiple files to have consistent naming conventions.
- Renamed fn_info_message_* functions to fn_info_messages_* for clarity and consistency.
- Updated function calls accordingly.

* refactor: remove unnecessary code duplication in info_game.sh

The commit removes duplicated code for retrieving server information from the game configuration file. Specifically, it removes redundant lines related to rconpassword, rconport, and serverpassword. This improves code readability and maintainability.

* cs2

* cs2

* cs2 icon

* remove lo

* remove file

* remove lo

* update url

* ignore games with no configs

* remove configs from games that have non

* details check fix

* details check

* details check

* ignore systemdir check if running github actions

* fix name
Daniel Gibbs 2 년 전
부모
커밋
f33bfdf47c
38개의 변경된 파일507개의 추가작업 그리고 259개의 파일을 삭제
  1. 2 2
      .github/workflows/details-check.yml
  2. 1 1
      .github/workflows/detals-check-generate-matrix.sh
  3. 217 0
      lgsm/config-default/config-lgsm/cs2server/_default.cfg
  4. 0 3
      lgsm/config-default/config-lgsm/inssserver/_default.cfg
  5. 0 5
      lgsm/config-default/config-lgsm/sbotsserver/_default.cfg
  6. 1 1
      lgsm/data/almalinux-8.csv
  7. 1 1
      lgsm/data/almalinux-9.csv
  8. 1 1
      lgsm/data/centos-7.csv
  9. 1 1
      lgsm/data/centos-8.csv
  10. 1 1
      lgsm/data/centos-9.csv
  11. 1 1
      lgsm/data/debian-10.csv
  12. 1 1
      lgsm/data/debian-11.csv
  13. 1 1
      lgsm/data/debian-12.csv
  14. 1 1
      lgsm/data/debian-9.csv
  15. BIN
      lgsm/data/gameicons/cs2-icon.png
  16. BIN
      lgsm/data/gameicons/lo-icon.png
  17. 1 1
      lgsm/data/rhel-7.csv
  18. 1 1
      lgsm/data/rhel-8.csv
  19. 1 1
      lgsm/data/rhel-9.csv
  20. 1 1
      lgsm/data/rocky-8.csv
  21. 1 1
      lgsm/data/rocky-9.csv
  22. 1 0
      lgsm/data/serverlist.csv
  23. 1 1
      lgsm/data/ubuntu-16.04.csv
  24. 1 1
      lgsm/data/ubuntu-18.04.csv
  25. 1 1
      lgsm/data/ubuntu-20.04.csv
  26. 1 1
      lgsm/data/ubuntu-22.04.csv
  27. 1 1
      lgsm/data/ubuntu-23.04.csv
  28. 1 1
      lgsm/data/ubuntu-23.10.csv
  29. 5 5
      lgsm/modules/alert.sh
  30. 1 1
      lgsm/modules/check_system_dir.sh
  31. 11 11
      lgsm/modules/command_details.sh
  32. 1 1
      lgsm/modules/command_dev_query_raw.sh
  33. 11 11
      lgsm/modules/command_postdetails.sh
  34. 1 1
      lgsm/modules/command_stop.sh
  35. 2 2
      lgsm/modules/fix.sh
  36. 22 0
      lgsm/modules/info_game.sh
  37. 206 196
      lgsm/modules/info_messages.sh
  38. 6 0
      lgsm/modules/install_config.sh

+ 2 - 2
.github/workflows/details-check.yml

@@ -59,14 +59,14 @@ jobs:
 
       - name: Download config
         run: |
-          if [ -z "${{ steps.sets-servercfgname.outputs.servercfgname }}" ]; then
+          if [ "${{ steps.sets-servercfgname.outputs.servercfgname }}" == "" ]; then
             echo "This game server has no config file."
           else
             curl -f -o config "https://raw.githubusercontent.com/GameServerManagers/Game-Server-Configs/main/${{ matrix.shortname }}/${{ steps.sets-servercfgname.outputs.servercfgname }}"
           fi
       - name: Display config
         run: |
-          if [ -z "${{ steps.sets-servercfgname.outputs.servercfgname }}" ]; then
+          if [ "${{ steps.sets-servercfgname.outputs.servercfgname }}" == "" ]; then
             echo "This game server has no config file."
           else
             cat config

+ 1 - 1
.github/workflows/detals-check-generate-matrix.sh

@@ -1,6 +1,6 @@
 #!/bin/bash
 
-curl "https://raw.githubusercontent.com/GameServerManagers/LinuxGSM/master/lgsm/data/serverlist.csv" | grep -v '^[[:blank:]]*$' > serverlist.csv
+curl "https://raw.githubusercontent.com/GameServerManagers/LinuxGSM/${GITHUB_REF#refs/heads/}/lgsm/data/serverlist.csv" | grep -v '^[[:blank:]]*$' > serverlist.csv
 
 echo -n "{" > "shortnamearray.json"
 echo -n "\"include\":[" >> "shortnamearray.json"

+ 217 - 0
lgsm/config-default/config-lgsm/cs2server/_default.cfg

@@ -0,0 +1,217 @@
+##################################
+######## 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
+# https://docs.linuxgsm.com/game-servers/counter-strike-2
+# [Game Modes]						gametype	gamemode	gamemodeflags	skirmishid	mapgroup (you can mix these across all Game Modes except Danger Zone, but use only one)
+# Arms Race							1			0			0				0			mg_armsrace
+# Boom! Headshot!					1			2			0				6			mg_skirmish_headshots
+# Classic Casual					0			0			0				0			mg_casualsigma, mg_casualdelta
+# Classic Competitive (Default)		0			1			0				0			mg_active, mg_reserves, mg_hostage, mg_de_dust2, ...
+# Classic Competitive (Short Match)	0			1			32				0			mg_active, mg_reserves, mg_hostage, mg_de_dust2, ...
+# Danger Zone						6			0			0				0			mg_dz_blacksite (map: dz_blacksite), mg_dz_sirocco (map: dz_sirocco)
+# Deathmatch (Default)				1			2			0				0			mg_deathmatch
+# Deathmatch (Free For All)			1			2			32				0			mg_deathmatch
+# Deathmatch (Team vs Team)			1			2			4				0			mg_deathmatch
+# Demolition						1			1			0				0			mg_demolition
+# Flying Scoutsman					0			0			0				3			mg_skirmish_flyingscoutsman
+# Hunter-Gatherers					1			2			0				7			mg_skirmish_huntergatherers
+# Retakes							0			0			0				12			mg_skirmish_retakes
+# Stab Stab Zap						0			0			0				1			mg_skirmish_stabstabzap
+# Trigger Discipline				0			0			0				4			mg_skirmish_triggerdiscipline
+# Wingman							0			2			0				0			mg_de_prime, mg_de_blagai, mg_de_vertigo, mg_de_inferno, mg_de_overpass, mg_de_cbble, mg_de_train, mg_de_shortnuke,	mg_de_shortdust, mg_de_lake
+gametype="0"
+gamemode="1"
+gamemodeflags="0"
+skirmishid="0"
+mapgroup="mg_active"
+ip="0.0.0.0"
+port="27015"
+defaultmap="de_dust2"
+maxplayers="16"
+tickrate="64"
+
+## Game Server Login Token (GSLT): Required
+# GSLT is required for running a public server.
+# More info: https://docs.linuxgsm.com/steamcmd/gslt
+gslt=""
+
+## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters
+startparameters="-dedicated +sv_setsteamaccount ${gslt} +map ${defaultmap} +game_type 0 +game_mode 1 +sv_logfile 1 -serverlogging +exec ${selfname}.cfg"
+
+#### 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="730"
+steamcmdforcewindows="no"
+# SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch
+branch=""
+betapassword=""
+# Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server
+steammaster="true"
+
+## 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="9"
+
+## Query mode
+# 1: session only
+# 2: gamedig (gsquery fallback)
+# 3: gamedig
+# 4: gsquery
+# 5: tcp
+querymode="2"
+querytype="protocol-valve"
+
+## Console type
+consoleverbose="yes"
+consoleinteract="yes"
+
+## Game Server Details
+# Do not edit
+gamename="Counter-Strike 2"
+engine="source2"
+glibc="2.31"
+
+#### Directories ####
+# Edit with care
+
+## Game Server Directories
+systemdir="${serverfiles}/game/csgo"
+executabledir="${serverfiles}/game/bin/linuxsteamrt64"
+executable="./cs2"
+servercfgdir="${systemdir}/cfg"
+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="${systemdir}/logs"
+lgsmlogdir="${logdir}/script"
+consolelogdir="${logdir}/console"
+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"

+ 0 - 3
lgsm/config-default/config-lgsm/inssserver/_default.cfg

@@ -168,9 +168,6 @@ glibc="2.17"
 systemdir="${serverfiles}/Insurgency"
 executabledir="${systemdir}/Binaries/Linux"
 executable="./InsurgencyServer-Linux-Shipping"
-servercfgdir="${systemdir}/Saved/Config/LinuxServer"
-servercfg="Game.ini"
-servercfgdefault="Game.ini"
 
 ## Backup Directory
 backupdir="${lgsmdir}/backup"

+ 0 - 5
lgsm/config-default/config-lgsm/sbotsserver/_default.cfg

@@ -157,11 +157,6 @@ glibc="2.17"
 systemdir="${serverfiles}"
 executabledir="${systemdir}/blank1/Binaries/Linux"
 executable="./blank1Server-Linux-Shipping"
-servercfgdir="${systemdir}/blank1/Saved/Config/LinuxServer"
-servercfg="Game.ini"
-servercfgdefault="Game.ini"
-servercfgfullpath="${servercfgdir}/${servercfg}"
-
 ## Backup Directory
 backupdir="${lgsmdir}/backup"
 

+ 1 - 1
lgsm/data/almalinux-8.csv

@@ -29,6 +29,7 @@ coduo,compat-libstdc++-33.i686
 codwaw
 col
 cs
+cs2
 cscz
 csgo
 css,ncurses-libs.i686
@@ -64,7 +65,6 @@ kf
 kf2
 l4d
 l4d2
-lo
 mc,java-17-openjdk
 mcb,libnsl
 mh

+ 1 - 1
lgsm/data/almalinux-9.csv

@@ -29,6 +29,7 @@ coduo,compat-libstdc++-33.i686
 codwaw
 col
 cs
+cs2
 cscz
 csgo
 css,ncurses-libs.i686
@@ -64,7 +65,6 @@ kf
 kf2
 l4d
 l4d2
-lo
 mc,java-17-openjdk
 mcb,libnsl
 mh

+ 1 - 1
lgsm/data/centos-7.csv

@@ -29,6 +29,7 @@ coduo,compat-libstdc++-33.i686
 codwaw
 col
 cs
+cs2
 cscz
 csgo
 css,ncurses-libs.i686
@@ -64,7 +65,6 @@ kf
 kf2
 l4d
 l4d2
-lo
 mc,java-11-openjdk
 mcb,libnsl
 mh

+ 1 - 1
lgsm/data/centos-8.csv

@@ -29,6 +29,7 @@ coduo,compat-libstdc++-33.i686
 codwaw
 col
 cs
+cs2
 cscz
 csgo
 css,ncurses-libs.i686
@@ -64,7 +65,6 @@ kf
 kf2
 l4d
 l4d2
-lo
 mc,java-17-openjdk
 mcb,libnsl
 mh

+ 1 - 1
lgsm/data/centos-9.csv

@@ -29,6 +29,7 @@ coduo,compat-libstdc++-33.i686
 codwaw
 col
 cs
+cs2
 cscz
 csgo
 css,ncurses-libs.i686
@@ -64,7 +65,6 @@ kf
 kf2
 l4d
 l4d2
-lo
 mc,java-17-openjdk
 mcb,libnsl
 mh

+ 1 - 1
lgsm/data/debian-10.csv

@@ -29,6 +29,7 @@ coduo,libstdc++5:i386
 codwaw
 col
 cs
+cs2
 cscz
 csgo
 css,libtinfo5:i386
@@ -64,7 +65,6 @@ kf
 kf2
 l4d
 l4d2
-lo
 mc,openjdk-11-jre
 mcb
 mh

+ 1 - 1
lgsm/data/debian-11.csv

@@ -29,6 +29,7 @@ coduo,libstdc++5:i386
 codwaw
 col
 cs
+cs2
 cscz
 csgo
 css,libtinfo5:i386
@@ -64,7 +65,6 @@ kf
 kf2
 l4d
 l4d2
-lo
 mc,openjdk-17-jre
 mcb
 mh

+ 1 - 1
lgsm/data/debian-12.csv

@@ -29,6 +29,7 @@ coduo,libstdc++5:i386
 codwaw
 col
 cs
+cs2
 cscz
 csgo
 css,libtinfo5:i386
@@ -64,7 +65,6 @@ kf
 kf2
 l4d
 l4d2
-lo
 mc,openjdk-17-jre
 mcb
 mh

+ 1 - 1
lgsm/data/debian-9.csv

@@ -29,6 +29,7 @@ coduo,libstdc++5:i386
 codwaw
 col
 cs
+cs2
 cscz
 csgo
 css,libtinfo5:i386
@@ -64,7 +65,6 @@ kf
 kf2
 l4d
 l4d2
-lo
 mc,openjdk-8-jre
 mcb
 mh

BIN
lgsm/data/gameicons/cs2-icon.png


BIN
lgsm/data/gameicons/lo-icon.png


+ 1 - 1
lgsm/data/rhel-7.csv

@@ -29,6 +29,7 @@ coduo,compat-libstdc++-33.i686
 codwaw
 col
 cs
+cs2
 cscz
 csgo
 css,ncurses-libs.i686
@@ -64,7 +65,6 @@ kf
 kf2
 l4d
 l4d2
-lo
 mc,java-11-openjdk
 mcb,libnsl
 mh

+ 1 - 1
lgsm/data/rhel-8.csv

@@ -29,6 +29,7 @@ coduo,compat-libstdc++-33.i686
 codwaw
 col
 cs
+cs2
 cscz
 csgo
 css,ncurses-libs.i686
@@ -64,7 +65,6 @@ kf
 kf2
 l4d
 l4d2
-lo
 mc,java-17-openjdk
 mcb,libnsl
 mh

+ 1 - 1
lgsm/data/rhel-9.csv

@@ -29,6 +29,7 @@ coduo,compat-libstdc++-33.i686
 codwaw
 col
 cs
+cs2
 cscz
 csgo
 css,ncurses-libs.i686
@@ -64,7 +65,6 @@ kf
 kf2
 l4d
 l4d2
-lo
 mc,java-17-openjdk
 mcb,libnsl
 mh

+ 1 - 1
lgsm/data/rocky-8.csv

@@ -29,6 +29,7 @@ coduo,compat-libstdc++-33.i686
 codwaw
 col
 cs
+cs2
 cscz
 csgo
 css,ncurses-libs.i686
@@ -64,7 +65,6 @@ kf
 kf2
 l4d
 l4d2
-lo
 mc,java-17-openjdk
 mcb,libnsl
 mh

+ 1 - 1
lgsm/data/rocky-9.csv

@@ -29,6 +29,7 @@ coduo,compat-libstdc++-33.i686
 codwaw
 col
 cs
+cs2
 cscz
 csgo
 css,ncurses-libs.i686
@@ -64,7 +65,6 @@ kf
 kf2
 l4d
 l4d2
-lo
 mc,java-17-openjdk
 mcb,libnsl
 mh

+ 1 - 0
lgsm/data/serverlist.csv

@@ -28,6 +28,7 @@ coduo,coduoserver,Call of Duty: United Offensive,ubuntu-22.04
 codwaw,codwawserver,Call of Duty: World at War,ubuntu-22.04
 col,colserver,Colony Survival,ubuntu-22.04
 cs,csserver,Counter-Strike 1.6,ubuntu-22.04
+cs2,cs2server,Counter-Strike 2,ubuntu-22.04
 cscz,csczserver,Counter-Strike: Condition Zero,ubuntu-22.04
 csgo,csgoserver,Counter-Strike: Global Offensive,ubuntu-22.04
 css,cssserver,Counter-Strike: Source,ubuntu-22.04

+ 1 - 1
lgsm/data/ubuntu-16.04.csv

@@ -29,6 +29,7 @@ coduo,libstdc++5:i386
 codwaw
 col
 cs
+cs2
 cscz
 csgo
 css,libtinfo5:i386
@@ -64,7 +65,6 @@ kf
 kf2
 l4d
 l4d2
-lo
 mc,openjdk-8-jre
 mcb
 mh

+ 1 - 1
lgsm/data/ubuntu-18.04.csv

@@ -29,6 +29,7 @@ coduo,libstdc++5:i386
 codwaw
 col
 cs
+cs2
 cscz
 csgo
 css,libtinfo5:i386
@@ -64,7 +65,6 @@ kf
 kf2
 l4d
 l4d2
-lo
 mc,openjdk-11-jre
 mcb
 mh

+ 1 - 1
lgsm/data/ubuntu-20.04.csv

@@ -29,6 +29,7 @@ coduo,libstdc++5:i386
 codwaw
 col
 cs
+cs2
 cscz
 csgo
 css,libtinfo5:i386
@@ -64,7 +65,6 @@ kf
 kf2
 l4d
 l4d2
-lo
 mc,openjdk-17-jre
 mcb
 mh

+ 1 - 1
lgsm/data/ubuntu-22.04.csv

@@ -29,6 +29,7 @@ coduo,libstdc++5:i386
 codwaw
 col
 cs
+cs2
 cscz
 csgo
 css,libtinfo5:i386
@@ -64,7 +65,6 @@ kf
 kf2
 l4d
 l4d2
-lo
 mc,openjdk-17-jre
 mcb
 mh

+ 1 - 1
lgsm/data/ubuntu-23.04.csv

@@ -29,6 +29,7 @@ coduo,libstdc++5:i386
 codwaw
 col
 cs
+cs2
 cscz
 csgo
 css,libtinfo5:i386
@@ -64,7 +65,6 @@ kf
 kf2
 l4d
 l4d2
-lo
 mc,openjdk-17-jre
 mcb
 mh

+ 1 - 1
lgsm/data/ubuntu-23.10.csv

@@ -29,6 +29,7 @@ coduo,libstdc++5:i386
 codwaw
 col
 cs
+cs2
 cscz
 csgo
 css,libtinfo5:i386
@@ -64,7 +65,6 @@ kf
 kf2
 l4d
 l4d2
-lo
 mc,openjdk-17-jre
 mcb
 mh

+ 5 - 5
lgsm/modules/alert.sh

@@ -18,11 +18,11 @@ fn_alert_log() {
 	fi
 
 	{
-		fn_info_message_head
-		fn_info_message_distro
-		fn_info_message_server_resource
-		fn_info_message_gameserver_resource
-		fn_info_message_gameserver
+		fn_info_messages_head
+		fn_info_messages_distro
+		fn_info_messages_server_resource
+		fn_info_messages_gameserver_resource
+		fn_info_messages_gameserver
 		fn_info_logs
 	} | sed -r "s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[m|K]//g" | tee -a "${alertlog}" > /dev/null 2>&1
 }

+ 1 - 1
lgsm/modules/check_system_dir.sh

@@ -15,7 +15,7 @@ if [ ! -d "${serverfiles}" ]; then
 	core_exit.sh
 fi
 
-if [ ! -d "${systemdir}" ]; then
+if [ ! -d "${systemdir}" ] && [ -z "${CI}" ]; then
 	fn_print_fail_nl "Cannot access ${systemdir}: No such directory"
 	if [ -d "${lgsmlogdir}" ]; then
 		fn_script_log_fail "Cannot access ${systemdir}: No such directory."

+ 11 - 11
lgsm/modules/command_details.sh

@@ -23,20 +23,20 @@ if [ "${querymode}" == "2" ] || [ "${querymode}" == "3" ]; then
 		fi
 	done
 fi
-fn_info_message_distro
-fn_info_message_server_resource
-fn_info_message_gameserver_resource
-fn_info_message_gameserver
-fn_info_message_script
-fn_info_message_backup
+fn_info_messages_distro
+fn_info_messages_server_resource
+fn_info_messages_gameserver_resource
+fn_info_messages_gameserver
+fn_info_messages_script
+fn_info_messages_backup
 # Some game servers do not have parms.
 if [ "${shortname}" != "jc2" ] && [ "${shortname}" != "dst" ] && [ "${shortname}" != "pz" ] && [ "${engine}" != "renderware" ]; then
-	fn_info_message_commandlineparms
+	fn_info_messages_commandlineparms
 fi
-fn_info_message_ports_edit
-fn_info_message_ports
-fn_info_message_select_engine
-fn_info_message_statusbottom
+fn_info_messages_ports_edit
+fn_info_messages_ports
+fn_info_messages_select_engine
+fn_info_messages_statusbottom
 
 exitcode=0
 core_exit.sh

+ 1 - 1
lgsm/modules/command_dev_query_raw.sh

@@ -185,7 +185,7 @@ fn_messages_separator
 echo -e ""
 echo -e "${lightgreen}SS Output${default}"
 fn_messages_separator
-fn_info_message_ports
+fn_info_messages_ports
 eval "${portcommand}"
 echo -e ""
 echo -e "${lightgreen}Query Port - Raw Output${default}"

+ 11 - 11
lgsm/modules/command_postdetails.sh

@@ -42,20 +42,20 @@ else
 	done
 	touch "${postdetailslog}" || fn_bad_postdetailslog
 	{
-		fn_info_message_distro
-		fn_info_message_server_resource
-		fn_info_message_gameserver_resource
-		fn_info_message_gameserver
-		fn_info_message_script
-		fn_info_message_backup
+		fn_info_messages_distro
+		fn_info_messages_server_resource
+		fn_info_messages_gameserver_resource
+		fn_info_messages_gameserver
+		fn_info_messages_script
+		fn_info_messages_backup
 		# Some game servers do not have parms.
 		if [ "${shortname}" != "jc2" ] && [ "${shortname}" != "jc3" ] && [ "${shortname}" != "dst" ] && [ "${shortname}" != "pz" ] && [ "${engine}" != "renderware" ]; then
-			fn_info_message_commandlineparms
+			fn_info_messages_commandlineparms
 		fi
-		fn_info_message_ports_edit
-		fn_info_message_ports
-		fn_info_message_select_engine
-		fn_info_message_statusbottom
+		fn_info_messages_ports_edit
+		fn_info_messages_ports
+		fn_info_messages_select_engine
+		fn_info_messages_statusbottom
 	} | sed -r "s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[m|K]//g" | tee -a "${postdetailslog}" > /dev/null 2>&1
 fi
 

+ 1 - 1
lgsm/modules/command_stop.sh

@@ -14,7 +14,7 @@ fn_firstcommand_set
 fn_stop_graceful_ctrlc() {
 	fn_print_dots "Graceful: CTRL+c"
 	fn_script_log_info "Graceful: CTRL+c"
-	# Sends quit.
+	# Sends CTRL+c.
 	tmux -L "${socketname}" send-keys -t "${sessionname}" C-c > /dev/null 2>&1
 	# Waits up to 30 seconds giving the server time to shutdown gracefuly.
 	for seconds in {1..30}; do

+ 2 - 2
lgsm/modules/fix.sh

@@ -53,12 +53,12 @@ fn_apply_fix() {
 }
 
 apply_pre_start_fix=(arma3 armar ark av bt bo csgo cmw dst hw ins nmrih onset pvr rust rw sdtd sfc sof2 squad st tf2 terraria ts3 mcb mta unt vh wurm zmr)
-apply_post_install_fix=(av kf kf2 lo ro samp ut2k4 ut ut3)
+apply_post_install_fix=(av kf kf2 ro samp ut2k4 ut ut3)
 
 # validate registered fixes for safe development
 for fix in "${apply_pre_start_fix[@]}" "${apply_post_install_fix[@]}"; do
 	if ! fn_exists_fix "${fix}"; then
-		fn_print_fail_nl "fix_${fix}.sh is registered but doesn't exist. Typo or did you miss to modify core_functions.sh?"
+		fn_print_fail_nl "fix_${fix}.sh is registered but doesn't exist. Typo or did you miss to modify core_modules.sh?"
 		exitcode=1
 		core_exit.sh
 	fi

+ 22 - 0
lgsm/modules/info_game.sh

@@ -1132,6 +1132,26 @@ fn_info_game_col() {
 	steamport="${steamport:-"0"}"
 }
 
+# Config Type: Valve KeyValues
+# Comment: //
+# Example: hostname "SERVERNAME"
+# Filetype: cfg
+fn_info_game_cs2() {
+	if [ -f "${servercfgfullpath}" ]; then
+		fn_info_game_valve_keyvalues "servername" "hostname"
+	fi
+	# Steamport can be between 26901-26910 and is normally automatically set.
+	# Some servers might support -steamport parameter to set
+	if [ "${steamport}" == "0" ] || [ -v "${steamport}" ]; then
+		steamport="$(echo "${ssinfo}" | grep "${srcdslinuxpid}" | awk '{print $5}' | grep ":269" | cut -d ":" -f2)"
+	fi
+	defaultmap="${defaultmap:-"NOT SET"}"
+	maxplayers="${maxplayers:-"0"}"
+	port="${port:-"0"}"
+	queryport="${port:-"0"}"
+	servername="${servername:-"NOT SET"}"
+}
+
 # Config Type: ini
 # Parameters: true
 # Comment: ; or #
@@ -2252,6 +2272,8 @@ elif [ "${shortname}" == "codwaw" ]; then
 	fn_info_game_codwaw
 elif [ "${shortname}" == "col" ]; then
 	fn_info_game_col
+elif [ "${shortname}" == "cs2" ]; then
+	fn_info_game_cs2
 elif [ "${shortname}" == "ct" ]; then
 	fn_info_game_ct
 elif [ "${shortname}" == "dayz" ]; then

+ 206 - 196
lgsm/modules/info_messages.sh

@@ -8,7 +8,7 @@
 moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
 
 # Removes the passwords form all but details.
-fn_info_message_password_strip() {
+fn_info_messages_password_strip() {
 	if [ "${commandname}" != "DETAILS" ]; then
 		if [ "${serverpassword}" ]; then
 			serverpassword="********"
@@ -46,7 +46,7 @@ fn_info_message_password_strip() {
 
 # Alert Summary
 # used with alertlog
-fn_info_message_head() {
+fn_info_messages_head() {
 	echo -e ""
 	echo -e "LinuxGSM Alert Summary"
 	fn_messages_separator
@@ -70,7 +70,7 @@ fn_info_message_head() {
 	echo -e "$(date)"
 }
 
-fn_info_message_distro() {
+fn_info_messages_distro() {
 	#
 	# Distro Details
 	# =================================
@@ -103,7 +103,7 @@ fn_info_message_distro() {
 	} | column -s $'\t' -t
 }
 
-fn_info_message_server_resource() {
+fn_info_messages_server_resource() {
 	#
 	# Server Resource
 	# =================================
@@ -169,7 +169,7 @@ fn_info_message_server_resource() {
 	} | column -s $'\t' -t
 }
 
-fn_info_message_gameserver_resource() {
+fn_info_messages_gameserver_resource() {
 	#
 	# Game Server Resource Usage
 	# =================================
@@ -212,7 +212,7 @@ fn_info_message_gameserver_resource() {
 	} | column -s $'\t' -t
 }
 
-fn_info_message_gameserver() {
+fn_info_messages_gameserver() {
 	#
 	# Counter-Strike: Global Offensive Server Details
 	# =================================
@@ -232,7 +232,7 @@ fn_info_message_gameserver() {
 
 	echo -e ""
 	echo -e "${bold}${lightgreen}${gamename} Server Details${default}"
-	fn_info_message_password_strip
+	fn_info_messages_password_strip
 	fn_messages_separator
 	{
 		# Server name
@@ -502,7 +502,7 @@ fn_info_message_gameserver() {
 	echo -e ""
 }
 
-fn_info_message_script() {
+fn_info_messages_script() {
 	# csgoserver Script Details
 	# =================================
 	# Script name:            csgoserver
@@ -601,7 +601,7 @@ fn_info_message_script() {
 	} | column -s $'\t' -t
 }
 
-fn_info_message_backup() {
+fn_info_messages_backup() {
 	#
 	# Backups
 	# =================================
@@ -633,7 +633,7 @@ fn_info_message_backup() {
 	fi
 }
 
-fn_info_message_commandlineparms() {
+fn_info_messages_commandlineparms() {
 	#
 	# Command-line Parameters
 	# =================================
@@ -641,7 +641,7 @@ fn_info_message_commandlineparms() {
 
 	echo -e ""
 	echo -e "${bold}${lightgreen}Command-line Parameters${default}"
-	fn_info_message_password_strip
+	fn_info_messages_password_strip
 	fn_messages_separator
 	if [ "${serverpassword}" == "NOT SET" ]; then
 		unset serverpassword
@@ -650,7 +650,7 @@ fn_info_message_commandlineparms() {
 	echo -e "${preexecutable} ${executable} ${startparameters}"
 }
 
-fn_info_message_ports_edit() {
+fn_info_messages_ports_edit() {
 	#
 	# Ports
 	# =================================
@@ -674,7 +674,7 @@ fn_info_message_ports_edit() {
 		fi
 	done
 	# engines/games that require editing the start parameters.
-	local ports_edit_array=("av" "ck" "col" "fctr" "goldsrc" "hcu" "hw" "iw3.0" "ioquake3" "qfusion" "rust" "scpsl" "scpslsm" "sol" "spark" "source" "unreal4" "arma3" "dayz" "unt" "vh")
+	local ports_edit_array=("av" "ck" "col" "cs2" "fctr" "goldsrc" "hcu" "hw" "iw3.0" "ioquake3" "qfusion" "rust" "scpsl" "scpslsm" "sol" "spark" "source" "unreal4" "arma3" "dayz" "unt" "vh")
 	for port_edit in "${ports_edit_array[@]}"; do
 		if [ "${engine}" == "${port_edit}" ] || [ "${gamename}" == "${port_edit}" ] || [ "${shortname}" == "${port_edit}" ]; then
 			startparameterslocation="${configdirserver}"
@@ -684,7 +684,7 @@ fn_info_message_ports_edit() {
 	echo -e ""
 }
 
-fn_info_message_ports() {
+fn_info_messages_ports() {
 	echo -e "${lightblue}Useful port diagnostic command:${default}"
 	if [ "${shortname}" == "armar" ]; then
 		portcommand="ss -tuplwn | grep enfMain"
@@ -708,7 +708,7 @@ fn_info_message_ports() {
 	echo -e ""
 }
 
-fn_info_message_statusbottom() {
+fn_info_messages_statusbottom() {
 	echo -e ""
 	if [ "${status}" == "0" ]; then
 		echo -e "${lightblue}Status:\t${red}STOPPED${default}"
@@ -783,7 +783,7 @@ fn_port() {
 	fi
 }
 
-fn_info_message_ac() {
+fn_info_messages_ac() {
 	{
 		fn_port "header"
 		fn_port "Game" port udp
@@ -793,7 +793,7 @@ fn_info_message_ac() {
 	} | column -s $'\t' -t
 }
 
-fn_info_message_ark() {
+fn_info_messages_ark() {
 	{
 		fn_port "header"
 		fn_port "Game" port udp
@@ -803,7 +803,7 @@ fn_info_message_ark() {
 	} | column -s $'\t' -t
 }
 
-fn_info_message_arma3() {
+fn_info_messages_arma3() {
 	{
 		fn_port "header"
 		fn_port "Game" port udp
@@ -815,7 +815,7 @@ fn_info_message_arma3() {
 	} | column -s $'\t' -t
 }
 
-fn_info_message_armar() {
+fn_info_messages_armar() {
 	{
 		fn_port "header"
 		fn_port "Game" port udp
@@ -824,7 +824,7 @@ fn_info_message_armar() {
 	} | column -s $'\t' -t
 }
 
-fn_info_message_av() {
+fn_info_messages_av() {
 	{
 		fn_port "header"
 		fn_port "Game" port udp
@@ -835,7 +835,7 @@ fn_info_message_av() {
 	} | column -s $'\t' -t
 }
 
-fn_info_message_bf1942() {
+fn_info_messages_bf1942() {
 	{
 		fn_port "header"
 		fn_port "Game" port udp
@@ -843,7 +843,7 @@ fn_info_message_bf1942() {
 	} | column -s $'\t' -t
 }
 
-fn_info_message_bfv() {
+fn_info_messages_bfv() {
 	{
 		fn_port "header"
 		fn_port "Game" port udp
@@ -851,7 +851,7 @@ fn_info_message_bfv() {
 	} | column -s $'\t' -t
 }
 
-fn_info_message_bo() {
+fn_info_messages_bo() {
 	{
 		fn_port "header"
 		fn_port "Game" port udp
@@ -859,7 +859,7 @@ fn_info_message_bo() {
 	} | column -s $'\t' -t
 }
 
-fn_info_message_bt() {
+fn_info_messages_bt() {
 	{
 		fn_port "header"
 		fn_port "Game" port udp
@@ -867,7 +867,7 @@ fn_info_message_bt() {
 	} | column -s $'\t' -t
 }
 
-fn_info_message_btl() {
+fn_info_messages_btl() {
 	{
 		fn_port "header"
 		fn_port "Game" port udp
@@ -893,8 +893,8 @@ fn_info_messages_ck() {
 	} | column -s $'\t' -t
 }
 
-fn_info_message_cmw() {
-	fn_info_message_password_strip
+fn_info_messages_cmw() {
+	fn_info_messages_password_strip
 	{
 		fn_port "header"
 		fn_port "Game" port udp
@@ -903,7 +903,7 @@ fn_info_message_cmw() {
 	} | column -s $'\t' -t
 }
 
-fn_info_message_cod() {
+fn_info_messages_cod() {
 	{
 		fn_port "header"
 		fn_port "Game" port udp
@@ -911,7 +911,7 @@ fn_info_message_cod() {
 	} | column -s $'\t' -t
 }
 
-fn_info_message_coduo() {
+fn_info_messages_coduo() {
 	{
 		fn_port "header"
 		fn_port "Game" port udp
@@ -919,7 +919,7 @@ fn_info_message_coduo() {
 	} | column -s $'\t' -t
 }
 
-fn_info_message_cod2() {
+fn_info_messages_cod2() {
 	{
 		fn_port "header"
 		fn_port "Game" port udp
@@ -927,7 +927,7 @@ fn_info_message_cod2() {
 	} | column -s $'\t' -t
 }
 
-fn_info_message_cod4() {
+fn_info_messages_cod4() {
 	{
 		fn_port "header"
 		fn_port "Game" port udp
@@ -935,7 +935,7 @@ fn_info_message_cod4() {
 	} | column -s $'\t' -t
 }
 
-fn_info_message_codwaw() {
+fn_info_messages_codwaw() {
 	{
 		fn_port "header"
 		fn_port "Game" port udp
@@ -943,7 +943,7 @@ fn_info_message_codwaw() {
 	} | column -s $'\t' -t
 }
 
-fn_info_message_col() {
+fn_info_messages_col() {
 	{
 		fn_port "header"
 		fn_port "Game" port udp
@@ -952,7 +952,15 @@ fn_info_message_col() {
 	} | column -s $'\t' -t
 }
 
-fn_info_message_csgo() {
+fn_info_messages_cs2() {
+	{
+		fn_port "header"
+		fn_port "Game" port udp
+		fn_port "Query" queryport tcp
+	} | column -s $'\t' -t
+}
+
+fn_info_messages_csgo() {
 	{
 		fn_port "header"
 		fn_port "Game" port udp
@@ -963,15 +971,15 @@ fn_info_message_csgo() {
 	} | column -s $'\t' -t
 }
 
-fn_info_message_ct() {
-	fn_info_message_password_strip
+fn_info_messages_ct() {
+	fn_info_messages_password_strip
 	{
 		fn_port "header"
 		fn_port "Game" port udp
 	} | column -s $'\t' -t
 }
 
-fn_info_message_dayz() {
+fn_info_messages_dayz() {
 	{
 		fn_port "header"
 		fn_port "Game" port udp
@@ -981,7 +989,7 @@ fn_info_message_dayz() {
 	} | column -s $'\t' -t
 }
 
-fn_info_message_dodr() {
+fn_info_messages_dodr() {
 	{
 		fn_port "header"
 		fn_port "Game" port udp
@@ -989,7 +997,7 @@ fn_info_message_dodr() {
 	} | column -s $'\t' -t
 }
 
-fn_info_message_dst() {
+fn_info_messages_dst() {
 	{
 		fn_port "header"
 		fn_port "Game: Server" port udp
@@ -999,7 +1007,7 @@ fn_info_message_dst() {
 	} | column -s $'\t' -t
 }
 
-fn_info_message_eco() {
+fn_info_messages_eco() {
 	{
 		fn_port "header"
 		fn_port "Game" port udp
@@ -1007,7 +1015,7 @@ fn_info_message_eco() {
 	} | column -s $'\t' -t
 }
 
-fn_info_message_etl() {
+fn_info_messages_etl() {
 	{
 		fn_port "header"
 		fn_port "Game" port udp
@@ -1015,7 +1023,7 @@ fn_info_message_etl() {
 	} | column -s $'\t' -t
 }
 
-fn_info_message_fctr() {
+fn_info_messages_fctr() {
 	{
 		fn_port "header"
 		fn_port "Game" port udp
@@ -1023,7 +1031,7 @@ fn_info_message_fctr() {
 	} | column -s $'\t' -t
 }
 
-fn_info_message_goldsrc() {
+fn_info_messages_goldsrc() {
 	{
 		fn_port "header"
 		fn_port "Game" port udp
@@ -1032,7 +1040,7 @@ fn_info_message_goldsrc() {
 	} | column -s $'\t' -t
 }
 
-fn_info_message_hcu() {
+fn_info_messages_hcu() {
 	{
 		fn_port "header"
 		fn_port "Game" port udp
@@ -1040,7 +1048,7 @@ fn_info_message_hcu() {
 	} | column -s $'\t' -t
 }
 
-fn_info_message_hw() {
+fn_info_messages_hw() {
 	{
 		fn_port "header"
 		fn_port "Game" port udp
@@ -1048,7 +1056,7 @@ fn_info_message_hw() {
 	} | column -s $'\t' -t
 }
 
-fn_info_message_ins() {
+fn_info_messages_ins() {
 	{
 		fn_port "header"
 		fn_port "Game" port udp
@@ -1059,7 +1067,7 @@ fn_info_message_ins() {
 	} | column -s $'\t' -t
 }
 
-fn_info_message_inss() {
+fn_info_messages_inss() {
 	{
 		fn_port "header"
 		fn_port "Game" port udp
@@ -1068,7 +1076,7 @@ fn_info_message_inss() {
 	} | column -s $'\t' -t
 }
 
-fn_info_message_jc2() {
+fn_info_messages_jc2() {
 	{
 		fn_port "header"
 		fn_port "Game" port udp
@@ -1076,7 +1084,7 @@ fn_info_message_jc2() {
 	} | column -s $'\t' -t
 }
 
-fn_info_message_jc3() {
+fn_info_messages_jc3() {
 	{
 		fn_port "header"
 		fn_port "Game" port udp
@@ -1086,14 +1094,14 @@ fn_info_message_jc3() {
 	} | column -s $'\t' -t
 }
 
-fn_info_message_jk2() {
+fn_info_messages_jk2() {
 	{
 		fn_port "header"
 		fn_port "Game" port udp
 	} | column -s $'\t' -t
 }
 
-fn_info_message_kf() {
+fn_info_messages_kf() {
 	{
 		fn_port "header"
 		fn_port "Game" port udp
@@ -1115,8 +1123,8 @@ fn_info_message_kf() {
 	} | column -s $'\t' -t
 }
 
-fn_info_message_kf2() {
-	fn_info_message_password_strip
+fn_info_messages_kf2() {
+	fn_info_messages_password_strip
 	{
 		fn_port "header"
 		fn_port "Game" port udp
@@ -1134,7 +1142,7 @@ fn_info_message_kf2() {
 	} | column -s $'\t' -t
 }
 
-fn_info_message_mc() {
+fn_info_messages_mc() {
 	{
 		fn_port "header"
 		fn_port "Game" port tcp
@@ -1143,7 +1151,7 @@ fn_info_message_mc() {
 	} | column -s $'\t' -t
 }
 
-fn_info_message_mcb() {
+fn_info_messages_mcb() {
 	{
 		fn_port "header"
 		fn_port "Game" port udp
@@ -1151,7 +1159,7 @@ fn_info_message_mcb() {
 	} | column -s $'\t' -t
 }
 
-fn_info_message_mh() {
+fn_info_messages_mh() {
 	{
 		fn_port "header"
 		fn_port "Game" port udp
@@ -1160,14 +1168,14 @@ fn_info_message_mh() {
 	} | column -s $'\t' -t
 }
 
-fn_info_message_mohaa() {
+fn_info_messages_mohaa() {
 	{
 		fn_port "header"
 		fn_port "Game" port udp
 	} | column -s $'\t' -t
 }
 
-fn_info_message_mom() {
+fn_info_messages_mom() {
 	{
 		fn_port "header"
 		fn_port "Game" port udp
@@ -1175,7 +1183,7 @@ fn_info_message_mom() {
 	} | column -s $'\t' -t
 }
 
-fn_info_message_mta() {
+fn_info_messages_mta() {
 	{
 		fn_port "header"
 		fn_port "Game" port udp
@@ -1186,14 +1194,14 @@ fn_info_message_mta() {
 	} | column -s $'\t' -t
 }
 
-fn_info_message_nec() {
+fn_info_messages_nec() {
 	{
 		fn_port "header"
 		fn_port "Game" port udp
 	} | column -s $'\t' -t
 }
 
-fn_info_message_ohd() {
+fn_info_messages_ohd() {
 	{
 		fn_port "header"
 		fn_port "Game" port udp
@@ -1202,7 +1210,7 @@ fn_info_message_ohd() {
 	} | column -s $'\t' -t
 }
 
-fn_info_message_onset() {
+fn_info_messages_onset() {
 	{
 		fn_port "header"
 		fn_port "Game" port udp
@@ -1211,7 +1219,7 @@ fn_info_message_onset() {
 	} | column -s $'\t' -t
 }
 
-fn_info_message_pc() {
+fn_info_messages_pc() {
 	{
 		fn_port "header"
 		fn_port "Game" port udp
@@ -1229,7 +1237,7 @@ fn_info_message_pc() {
 	} | column -s $'\t' -t
 }
 
-fn_info_message_pc2() {
+fn_info_messages_pc2() {
 	{
 		fn_port "header"
 		fn_port "Game" port udp
@@ -1238,7 +1246,7 @@ fn_info_message_pc2() {
 	} | column -s $'\t' -t
 }
 
-fn_info_message_ps() {
+fn_info_messages_ps() {
 	{
 		fn_port "header"
 		fn_port "Game" port udp
@@ -1247,7 +1255,7 @@ fn_info_message_ps() {
 	} | column -s $'\t' -t
 }
 
-fn_info_message_pvr() {
+fn_info_messages_pvr() {
 	{
 		fn_port "header"
 		fn_port "Game" port udp
@@ -1257,7 +1265,7 @@ fn_info_message_pvr() {
 	} | column -s $'\t' -t
 }
 
-fn_info_message_pz() {
+fn_info_messages_pz() {
 	{
 		fn_port "header"
 		fn_port "Game" port udp
@@ -1265,28 +1273,28 @@ fn_info_message_pz() {
 	} | column -s $'\t' -t
 }
 
-fn_info_message_qw() {
+fn_info_messages_qw() {
 	{
 		fn_port "header"
 		fn_port "Game" port udp
 	} | column -s $'\t' -t
 }
 
-fn_info_message_q2() {
+fn_info_messages_q2() {
 	{
 		fn_port "header"
 		fn_port "Game" port udp
 	} | column -s $'\t' -t
 }
 
-fn_info_message_q3() {
+fn_info_messages_q3() {
 	{
 		fn_port "header"
 		fn_port "Game" port udp
 	} | column -s $'\t' -t
 }
 
-fn_info_message_ql() {
+fn_info_messages_ql() {
 	{
 		fn_port "header"
 		fn_port "Game" port udp
@@ -1296,7 +1304,7 @@ fn_info_message_ql() {
 	} | column -s $'\t' -t
 }
 
-fn_info_message_ro() {
+fn_info_messages_ro() {
 	{
 		fn_port "header"
 		fn_port "Game" port udp
@@ -1317,14 +1325,14 @@ fn_info_message_ro() {
 	} | column -s $'\t' -t
 }
 
-fn_info_message_rtcw() {
+fn_info_messages_rtcw() {
 	{
 		fn_port "header"
 		fn_port "Game" port udp
 	} | column -s $'\t' -t
 }
 
-fn_info_message_rust() {
+fn_info_messages_rust() {
 	{
 		fn_port "header"
 		fn_port "Game" port udp
@@ -1334,7 +1342,7 @@ fn_info_message_rust() {
 	} | column -s $'\t' -t
 }
 
-fn_info_message_rw() {
+fn_info_messages_rw() {
 	{
 		fn_port "header"
 		fn_port "Game" port udp
@@ -1343,7 +1351,7 @@ fn_info_message_rw() {
 	} | column -s $'\t' -t
 }
 
-fn_info_message_samp() {
+fn_info_messages_samp() {
 	{
 		fn_port "header"
 		fn_port "Game" port udp
@@ -1351,7 +1359,7 @@ fn_info_message_samp() {
 	} | column -s $'\t' -t
 }
 
-fn_info_message_sb() {
+fn_info_messages_sb() {
 	{
 		fn_port "header"
 		fn_port "Game" port udp
@@ -1360,7 +1368,7 @@ fn_info_message_sb() {
 	} | column -s $'\t' -t
 }
 
-fn_info_message_sbots() {
+fn_info_messages_sbots() {
 	{
 		fn_port "header"
 		fn_port "Game" port udp
@@ -1368,15 +1376,15 @@ fn_info_message_sbots() {
 	} | column -s $'\t' -t
 }
 
-fn_info_message_scpsl() {
+fn_info_messages_scpsl() {
 	{
 		fn_port "header"
 		fn_port "Game" port tcp
 	} | column -s $'\t' -t
 }
 
-fn_info_message_sdtd() {
-	fn_info_message_password_strip
+fn_info_messages_sdtd() {
+	fn_info_messages_password_strip
 	{
 		fn_port "header"
 		fn_port "Game" port udp
@@ -1403,7 +1411,7 @@ fn_info_message_sdtd() {
 	} | column -s $'\t' -t
 }
 
-fn_info_message_sf() {
+fn_info_messages_sf() {
 	{
 		fn_port "header"
 		fn_port "Game" port udp
@@ -1412,7 +1420,7 @@ fn_info_message_sf() {
 	} | column -s $'\t' -t
 }
 
-fn_info_message_sof2() {
+fn_info_messages_sof2() {
 	{
 		fn_port "header"
 		fn_port "Game" port udp
@@ -1420,7 +1428,7 @@ fn_info_message_sof2() {
 	} | column -s $'\t' -t
 }
 
-fn_info_message_sol() {
+fn_info_messages_sol() {
 	{
 		fn_port "header"
 		fn_port "Game" port udp
@@ -1429,7 +1437,7 @@ fn_info_message_sol() {
 	} | column -s $'\t' -t
 }
 
-fn_info_message_prism3d() {
+fn_info_messages_prism3d() {
 	{
 		fn_port "header"
 		fn_port "Game" port udp
@@ -1437,7 +1445,7 @@ fn_info_message_prism3d() {
 	} | column -s $'\t' -t
 }
 
-fn_info_message_source() {
+fn_info_messages_source() {
 	{
 		fn_port "header"
 		fn_port "Game" port udp
@@ -1452,8 +1460,8 @@ fn_info_message_source() {
 	} | column -s $'\t' -t
 }
 
-fn_info_message_spark() {
-	fn_info_message_password_strip
+fn_info_messages_spark() {
+	fn_info_messages_password_strip
 	{
 		fn_port "header"
 		fn_port "Game" port udp
@@ -1470,7 +1478,7 @@ fn_info_message_spark() {
 	} | column -s $'\t' -t
 }
 
-fn_info_message_squad() {
+fn_info_messages_squad() {
 	{
 		fn_port "header"
 		fn_port "Game" port udp
@@ -1479,7 +1487,7 @@ fn_info_message_squad() {
 	} | column -s $'\t' -t
 }
 
-fn_info_message_st() {
+fn_info_messages_st() {
 	{
 		fn_port "header"
 		fn_port "Game" port udp
@@ -1487,7 +1495,7 @@ fn_info_message_st() {
 	} | column -s $'\t' -t
 }
 
-fn_info_message_ti() {
+fn_info_messages_ti() {
 	{
 		fn_port "header"
 		fn_port "Game" port udp
@@ -1496,7 +1504,7 @@ fn_info_message_ti() {
 	} | column -s $'\t' -t
 }
 
-fn_info_message_ts3() {
+fn_info_messages_ts3() {
 	{
 		fn_port "header"
 		fn_port "Voice" port udp
@@ -1509,7 +1517,7 @@ fn_info_message_ts3() {
 	} | column -s $'\t' -t
 }
 
-fn_info_message_tw() {
+fn_info_messages_tw() {
 	{
 		fn_port "header"
 		fn_port "Game" port udp
@@ -1517,7 +1525,7 @@ fn_info_message_tw() {
 	} | column -s $'\t' -t
 }
 
-fn_info_message_terraria() {
+fn_info_messages_terraria() {
 	{
 		fn_port "header"
 		fn_port "Game" port tcp
@@ -1525,7 +1533,7 @@ fn_info_message_terraria() {
 	} | column -s $'\t' -t
 }
 
-fn_info_message_tu() {
+fn_info_messages_tu() {
 	{
 		fn_port "header"
 		fn_port "Game" port udp
@@ -1534,7 +1542,7 @@ fn_info_message_tu() {
 	} | column -s $'\t' -t
 }
 
-fn_info_message_ut2k4() {
+fn_info_messages_ut2k4() {
 	{
 		fn_port "header"
 		fn_port "Game" port udp
@@ -1554,7 +1562,7 @@ fn_info_message_ut2k4() {
 	} | column -s $'\t' -t
 }
 
-fn_info_message_unreal() {
+fn_info_messages_unreal() {
 	{
 		fn_port "header"
 		fn_port "Game" port udp
@@ -1573,7 +1581,7 @@ fn_info_message_unreal() {
 	} | column -s $'\t' -t
 }
 
-fn_info_message_unt() {
+fn_info_messages_unt() {
 	{
 		fn_port "header"
 		fn_port "Game" port udp
@@ -1582,7 +1590,7 @@ fn_info_message_unt() {
 	} | column -s $'\t' -t
 }
 
-fn_info_message_ut() {
+fn_info_messages_ut() {
 	{
 		fn_port "header"
 		fn_port "Game" port udp
@@ -1590,8 +1598,8 @@ fn_info_message_ut() {
 	} | column -s $'\t' -t
 }
 
-fn_info_message_ut3() {
-	fn_info_message_password_strip
+fn_info_messages_ut3() {
+	fn_info_messages_password_strip
 	{
 		fn_port "header"
 		fn_port "Game" port udp
@@ -1609,7 +1617,7 @@ fn_info_message_ut3() {
 	} | column -s $'\t' -t
 }
 
-fn_info_message_vh() {
+fn_info_messages_vh() {
 	{
 		fn_port "header"
 		fn_port "Game" port udp
@@ -1617,21 +1625,21 @@ fn_info_message_vh() {
 	} | column -s $'\t' -t
 }
 
-fn_info_message_vints() {
+fn_info_messages_vints() {
 	{
 		fn_port "header"
 		fn_port "Game" port tcp
 	} | column -s $'\t' -t
 }
 
-fn_info_message_vpmc() {
+fn_info_messages_vpmc() {
 	{
 		fn_port "header"
 		fn_port "Game" port tcp
 	} | column -s $'\t' -t
 }
 
-fn_info_message_wet() {
+fn_info_messages_wet() {
 	{
 		fn_port "header"
 		fn_port "Game" port udp
@@ -1639,7 +1647,7 @@ fn_info_message_wet() {
 	} | column -s $'\t' -t
 }
 
-fn_info_message_wf() {
+fn_info_messages_wf() {
 	{
 		fn_port "header"
 		fn_port "Game" port udp
@@ -1647,7 +1655,7 @@ fn_info_message_wf() {
 	} | column -s $'\t' -t
 }
 
-fn_info_message_wurm() {
+fn_info_messages_wurm() {
 	{
 		fn_port "header"
 		fn_port "Game" port tcp
@@ -1657,7 +1665,7 @@ fn_info_message_wurm() {
 	} | column -s $'\t' -t
 }
 
-fn_info_message_stn() {
+fn_info_messages_stn() {
 	{
 		fn_port "header"
 		fn_port "Game" port udp
@@ -1665,186 +1673,188 @@ fn_info_message_stn() {
 	} | column -s $'\t' -t
 }
 
-fn_info_message_select_engine() {
+fn_info_messages_select_engine() {
 	# Display details depending on game or engine.
 	if [ "${shortname}" == "ac" ]; then
-		fn_info_message_ac
+		fn_info_messages_ac
 	elif [ "${shortname}" == "ark" ]; then
-		fn_info_message_ark
+		fn_info_messages_ark
 	elif [ "${shortname}" == "arma3" ]; then
-		fn_info_message_arma3
+		fn_info_messages_arma3
 	elif [ "${shortname}" == "armar" ]; then
-		fn_info_message_armar
+		fn_info_messages_armar
 	elif [ "${shortname}" == "av" ]; then
-		fn_info_message_av
+		fn_info_messages_av
 	elif [ "${shortname}" == "bf1942" ]; then
-		fn_info_message_bf1942
+		fn_info_messages_bf1942
 	elif [ "${shortname}" == "bfv" ]; then
-		fn_info_message_bfv
+		fn_info_messages_bfv
 	elif [ "${shortname}" == "bo" ]; then
-		fn_info_message_bo
+		fn_info_messages_bo
 	elif [ "${shortname}" == "bt" ]; then
-		fn_info_message_bt
+		fn_info_messages_bt
 	elif [ "${shortname}" == "btl" ]; then
-		fn_info_message_btl
+		fn_info_messages_btl
 	elif [ "${shortname}" == "cd" ]; then
 		fn_info_messages_cd
 	elif [ "${shortname}" == "ck" ]; then
 		fn_info_messages_ck
+	elif [ "${shortname}" == "cs2" ]; then
+		fn_info_messages_cs2
 	elif [ "${shortname}" == "csgo" ]; then
-		fn_info_message_csgo
+		fn_info_messages_csgo
 	elif [ "${shortname}" == "cmw" ]; then
-		fn_info_message_cmw
+		fn_info_messages_cmw
 	elif [ "${shortname}" == "cod" ]; then
-		fn_info_message_cod
+		fn_info_messages_cod
 	elif [ "${shortname}" == "coduo" ]; then
-		fn_info_message_coduo
+		fn_info_messages_coduo
 	elif [ "${shortname}" == "cod2" ]; then
-		fn_info_message_cod2
+		fn_info_messages_cod2
 	elif [ "${shortname}" == "cod4" ]; then
-		fn_info_message_cod4
+		fn_info_messages_cod4
 	elif [ "${shortname}" == "codwaw" ]; then
-		fn_info_message_codwaw
+		fn_info_messages_codwaw
 	elif [ "${shortname}" == "col" ]; then
-		fn_info_message_col
+		fn_info_messages_col
 	elif [ "${shortname}" == "ct" ]; then
-		fn_info_message_ct
+		fn_info_messages_ct
 	elif [ "${shortname}" == "dayz" ]; then
-		fn_info_message_dayz
+		fn_info_messages_dayz
 	elif [ "${shortname}" == "dodr" ]; then
-		fn_info_message_dodr
+		fn_info_messages_dodr
 	elif [ "${shortname}" == "dst" ]; then
-		fn_info_message_dst
+		fn_info_messages_dst
 	elif [ "${shortname}" == "eco" ]; then
-		fn_info_message_eco
+		fn_info_messages_eco
 	elif [ "${shortname}" == "etl" ]; then
-		fn_info_message_etl
+		fn_info_messages_etl
 	elif [ "${shortname}" == "fctr" ]; then
-		fn_info_message_fctr
+		fn_info_messages_fctr
 	elif [ "${shortname}" == "hcu" ]; then
-		fn_info_message_hcu
+		fn_info_messages_hcu
 	elif [ "${shortname}" == "hw" ]; then
-		fn_info_message_hw
+		fn_info_messages_hw
 	elif [ "${shortname}" == "ins" ]; then
-		fn_info_message_ins
+		fn_info_messages_ins
 	elif [ "${shortname}" == "inss" ]; then
-		fn_info_message_inss
+		fn_info_messages_inss
 	elif [ "${shortname}" == "jc2" ]; then
-		fn_info_message_jc2
+		fn_info_messages_jc2
 	elif [ "${shortname}" == "jc3" ]; then
-		fn_info_message_jc3
+		fn_info_messages_jc3
 	elif [ "${shortname}" == "jk2" ]; then
-		fn_info_message_jk2
+		fn_info_messages_jk2
 	elif [ "${shortname}" == "kf" ]; then
-		fn_info_message_kf
+		fn_info_messages_kf
 	elif [ "${shortname}" == "kf2" ]; then
-		fn_info_message_kf2
+		fn_info_messages_kf2
 	elif [ "${shortname}" == "mc" ] || [ "${shortname}" == "pmc" ] || [ "${shortname}" == "wmc" ]; then
-		fn_info_message_mc
+		fn_info_messages_mc
 	elif [ "${shortname}" == "mcb" ]; then
-		fn_info_message_mcb
+		fn_info_messages_mcb
 	elif [ "${shortname}" == "mh" ]; then
-		fn_info_message_mh
+		fn_info_messages_mh
 	elif [ "${shortname}" == "mohaa" ]; then
-		fn_info_message_mohaa
+		fn_info_messages_mohaa
 	elif [ "${shortname}" == "mom" ]; then
-		fn_info_message_mom
+		fn_info_messages_mom
 	elif [ "${shortname}" == "mta" ]; then
-		fn_info_message_mta
+		fn_info_messages_mta
 	elif [ "${shortname}" == "nec" ]; then
-		fn_info_message_nec
+		fn_info_messages_nec
 	elif [ "${shortname}" == "ohd" ]; then
-		fn_info_message_ohd
+		fn_info_messages_ohd
 	elif [ "${shortname}" == "onset" ]; then
-		fn_info_message_onset
+		fn_info_messages_onset
 	elif [ "${shortname}" == "pc" ]; then
-		fn_info_message_pc
+		fn_info_messages_pc
 	elif [ "${shortname}" == "pc2" ]; then
-		fn_info_message_pc2
+		fn_info_messages_pc2
 	elif [ "${shortname}" == "ps" ]; then
-		fn_info_message_ps
+		fn_info_messages_ps
 	elif [ "${shortname}" == "pvr" ]; then
-		fn_info_message_pvr
+		fn_info_messages_pvr
 	elif [ "${shortname}" == "pz" ]; then
-		fn_info_message_pz
+		fn_info_messages_pz
 	elif [ "${shortname}" == "q2" ]; then
-		fn_info_message_q2
+		fn_info_messages_q2
 	elif [ "${shortname}" == "q3" ]; then
-		fn_info_message_q3
+		fn_info_messages_q3
 	elif [ "${shortname}" == "ql" ]; then
-		fn_info_message_ql
+		fn_info_messages_ql
 	elif [ "${shortname}" == "qw" ]; then
-		fn_info_message_qw
+		fn_info_messages_qw
 	elif [ "${shortname}" == "ro" ]; then
-		fn_info_message_ro
+		fn_info_messages_ro
 	elif [ "${shortname}" == "rtcw" ]; then
-		fn_info_message_rtcw
+		fn_info_messages_rtcw
 	elif [ "${shortname}" == "samp" ]; then
-		fn_info_message_samp
+		fn_info_messages_samp
 	elif [ "${shortname}" == "sb" ]; then
-		fn_info_message_sb
+		fn_info_messages_sb
 	elif [ "${shortname}" == "sbots" ]; then
-		fn_info_message_sbots
+		fn_info_messages_sbots
 	elif [ "${shortname}" == "scpsl" ] || [ "${shortname}" == "scpslsm" ]; then
-		fn_info_message_scpsl
+		fn_info_messages_scpsl
 	elif [ "${shortname}" == "sdtd" ]; then
-		fn_info_message_sdtd
+		fn_info_messages_sdtd
 	elif [ "${shortname}" == "sf" ]; then
-		fn_info_message_sf
+		fn_info_messages_sf
 	elif [ "${shortname}" == "sof2" ]; then
-		fn_info_message_sof2
+		fn_info_messages_sof2
 	elif [ "${shortname}" == "sol" ]; then
-		fn_info_message_sol
+		fn_info_messages_sol
 	elif [ "${shortname}" == "squad" ]; then
-		fn_info_message_squad
+		fn_info_messages_squad
 	elif [ "${shortname}" == "st" ]; then
-		fn_info_message_st
+		fn_info_messages_st
 	elif [ "${shortname}" == "stn" ]; then
-		fn_info_message_stn
+		fn_info_messages_stn
 	elif [ "${shortname}" == "terraria" ]; then
-		fn_info_message_terraria
+		fn_info_messages_terraria
 	elif [ "${shortname}" == "ti" ]; then
-		fn_info_message_ti
+		fn_info_messages_ti
 	elif [ "${shortname}" == "ts3" ]; then
-		fn_info_message_ts3
+		fn_info_messages_ts3
 	elif [ "${shortname}" == "tu" ]; then
-		fn_info_message_tu
+		fn_info_messages_tu
 	elif [ "${shortname}" == "tw" ]; then
-		fn_info_message_tw
+		fn_info_messages_tw
 	elif [ "${shortname}" == "unt" ]; then
-		fn_info_message_unt
+		fn_info_messages_unt
 	elif [ "${shortname}" == "vh" ]; then
-		fn_info_message_vh
+		fn_info_messages_vh
 	elif [ "${shortname}" == "vints" ]; then
-		fn_info_message_vints
+		fn_info_messages_vints
 	elif [ "${shortname}" == "rust" ]; then
-		fn_info_message_rust
+		fn_info_messages_rust
 	elif [ "${shortname}" == "rw" ]; then
-		fn_info_message_rw
+		fn_info_messages_rw
 	elif [ "${shortname}" == "ut" ]; then
-		fn_info_message_ut
+		fn_info_messages_ut
 	elif [ "${shortname}" == "ut2k4" ]; then
-		fn_info_message_ut2k4
+		fn_info_messages_ut2k4
 	elif [ "${shortname}" == "ut3" ]; then
-		fn_info_message_ut3
+		fn_info_messages_ut3
 	elif [ "${shortname}" == "vpmc" ]; then
-		fn_info_message_vpmc
+		fn_info_messages_vpmc
 	elif [ "${shortname}" == "wet" ]; then
-		fn_info_message_wet
+		fn_info_messages_wet
 	elif [ "${shortname}" == "wf" ]; then
-		fn_info_message_wf
+		fn_info_messages_wf
 	elif [ "${shortname}" == "wurm" ]; then
-		fn_info_message_wurm
+		fn_info_messages_wurm
 	elif [ "${engine}" == "goldsrc" ]; then
-		fn_info_message_goldsrc
+		fn_info_messages_goldsrc
 	elif [ "${engine}" == "prism3d" ]; then
-		fn_info_message_prism3d
+		fn_info_messages_prism3d
 	elif [ "${engine}" == "source" ]; then
-		fn_info_message_source
+		fn_info_messages_source
 	elif [ "${engine}" == "spark" ]; then
-		fn_info_message_spark
+		fn_info_messages_spark
 	elif [ "${engine}" == "unreal" ]; then
-		fn_info_message_unreal
+		fn_info_messages_unreal
 	else
 		fn_print_error_nl "Unable to detect game server."
 	fi

+ 6 - 0
lgsm/modules/install_config.sh

@@ -346,6 +346,12 @@ elif [ "${shortname}" == "cs" ]; then
 	fn_default_config_remote
 	fn_set_config_vars
 	fn_list_config_locations
+elif [ "${shortname}" == "cs2" ]; then
+	array_configs+=(server.cfg)
+	fn_fetch_default_config
+	fn_default_config_remote
+	fn_set_config_vars
+	fn_list_config_locations
 elif [ "${shortname}" == "cscz" ]; then
 	array_configs+=(server.cfg)
 	fn_fetch_default_config