From 351cf4035a75e8ea27f9442b36475d2917120c10 Mon Sep 17 00:00:00 2001
From: Daniel Gibbs <me@danielgibbs.co.uk>
Date: Mon, 25 Nov 2019 09:50:01 +0000
Subject: [PATCH] feat(monitor): migrate monitor settings to _default.cfg
 (#2611)

* add mumble query
* re-ordered serverlist.csv
* gamedig refactor
* query raw update
* gamedig: changed --query_port to --port
* add query data to log
* remove UDP query as does not work.
* refactor gamedig and gsquery
* add missing Factorio rcon port
* add fn_monitor_check_queryport
* add TCP query to Factorio
* add mta query support
* MTA IP address must be set. No longer using config
* remove mumble and ts3 from bypassing check_ip
* update netstat command for Project Zomboid
* adde query port to Project Zomboid
* update query mode for samp
* Update Teeworlds query
* add Soldat to TCP query
* update ss3 port info
* add query details to Serious Sam 3
* add Terraria query port
* ts3 now uses tcp query as proper query requires permissions changes
* update ut99 query
* gsquery add gamespy1
* separate out unreal engine functions
* updated ut2k4 query
* update Teeworlds query
* update Factorio query
* change engine if to shortname
---
 .../config-lgsm/ahl2server/_default.cfg       |   9 +
 .../config-lgsm/ahlserver/_default.cfg        |   9 +
 .../config-lgsm/arkserver/_default.cfg        |   9 +
 .../config-lgsm/arma3server/_default.cfg      |   9 +
 .../config-lgsm/bb2server/_default.cfg        |   9 +
 .../config-lgsm/bbserver/_default.cfg         |   9 +
 .../config-lgsm/bdserver/_default.cfg         |   9 +
 .../config-lgsm/bf1942server/_default.cfg     |   9 +
 .../config-lgsm/bmdmserver/_default.cfg       |   9 +
 .../config-lgsm/boserver/_default.cfg         |   9 +
 .../config-lgsm/bsserver/_default.cfg         |   9 +
 .../config-lgsm/bt1944server/_default.cfg     |   9 +
 .../config-lgsm/btserver/_default.cfg         |   9 +
 .../config-lgsm/ccserver/_default.cfg         |   9 +
 .../config-lgsm/cod2server/_default.cfg       |   9 +
 .../config-lgsm/cod4server/_default.cfg       |   9 +
 .../config-lgsm/codserver/_default.cfg        |   9 +
 .../config-lgsm/coduoserver/_default.cfg      |   9 +
 .../config-lgsm/codwawserver/_default.cfg     |   9 +
 .../config-lgsm/csczserver/_default.cfg       |   9 +
 .../config-lgsm/csgoserver/_default.cfg       |   9 +
 .../config-lgsm/csserver/_default.cfg         |   9 +
 .../config-lgsm/cssserver/_default.cfg        |   9 +
 .../config-lgsm/dabserver/_default.cfg        |   9 +
 .../config-lgsm/dmcserver/_default.cfg        |   9 +
 .../config-lgsm/dodserver/_default.cfg        |   9 +
 .../config-lgsm/dodsserver/_default.cfg       |   9 +
 .../config-lgsm/doiserver/_default.cfg        |   9 +
 .../config-lgsm/dstserver/_default.cfg        |   9 +
 .../config-lgsm/dysserver/_default.cfg        |   9 +
 .../config-lgsm/ecoserver/_default.cfg        |   9 +
 .../config-lgsm/emserver/_default.cfg         |   9 +
 .../config-lgsm/etlserver/_default.cfg        |   9 +
 .../config-lgsm/fctrserver/_default.cfg       |   9 +
 .../config-lgsm/fofserver/_default.cfg        |   9 +
 .../config-lgsm/gesserver/_default.cfg        |   9 +
 .../config-lgsm/gmodserver/_default.cfg       |   9 +
 .../config-lgsm/hl2dmserver/_default.cfg      |   9 +
 .../config-lgsm/hldmserver/_default.cfg       |   9 +
 .../config-lgsm/hldmsserver/_default.cfg      |   9 +
 .../config-lgsm/hwserver/_default.cfg         |   9 +
 .../config-lgsm/insserver/_default.cfg        |   9 +
 .../config-lgsm/inssserver/_default.cfg       |   9 +
 .../config-lgsm/iosserver/_default.cfg        |   9 +
 .../config-lgsm/jc2server/_default.cfg        |   9 +
 .../config-lgsm/jc3server/_default.cfg        |   9 +
 .../config-lgsm/kf2server/_default.cfg        |   9 +
 .../config-lgsm/kfserver/_default.cfg         |   9 +
 .../config-lgsm/l4d2server/_default.cfg       |   9 +
 .../config-lgsm/l4dserver/_default.cfg        |   9 +
 .../config-lgsm/mcserver/_default.cfg         |   9 +
 .../config-lgsm/mhserver/_default.cfg         |   9 +
 .../config-lgsm/mohaaserver/_default.cfg      |   9 +
 .../config-lgsm/mtaserver/_default.cfg        |  12 +
 .../config-lgsm/mumbleserver/_default.cfg     |   9 +
 .../config-lgsm/ndserver/_default.cfg         |   9 +
 .../config-lgsm/nmrihserver/_default.cfg      |   9 +
 .../config-lgsm/ns2cserver/_default.cfg       |   9 +
 .../config-lgsm/ns2server/_default.cfg        |   9 +
 .../config-lgsm/nsserver/_default.cfg         |   9 +
 .../config-lgsm/opforserver/_default.cfg      |   9 +
 .../config-lgsm/pcserver/_default.cfg         |   9 +
 .../config-lgsm/pstbsserver/_default.cfg      |   9 +
 .../config-lgsm/pvkiiserver/_default.cfg      |   9 +
 .../config-lgsm/pzserver/_default.cfg         |   9 +
 .../config-lgsm/q2server/_default.cfg         |   9 +
 .../config-lgsm/q3server/_default.cfg         |   9 +
 .../config-lgsm/qlserver/_default.cfg         |   9 +
 .../config-lgsm/qwserver/_default.cfg         |   9 +
 .../config-lgsm/ricochetserver/_default.cfg   |   9 +
 .../config-lgsm/roserver/_default.cfg         |   9 +
 .../config-lgsm/rtcwserver/_default.cfg       |   9 +
 .../config-lgsm/rustserver/_default.cfg       |  11 +-
 .../config-lgsm/rwserver/_default.cfg         |   9 +
 .../config-lgsm/sampserver/_default.cfg       |  10 +
 .../config-lgsm/sbotsserver/_default.cfg      |   9 +
 .../config-lgsm/sbserver/_default.cfg         |   9 +
 .../config-lgsm/sdtdserver/_default.cfg       |   9 +
 .../config-lgsm/sfcserver/_default.cfg        |   9 +
 .../config-lgsm/sof2server/_default.cfg       |   9 +
 .../config-lgsm/solserver/_default.cfg        |   9 +
 .../config-lgsm/squadserver/_default.cfg      |   9 +
 .../config-lgsm/ss3server/_default.cfg        |   9 +
 .../config-lgsm/stserver/_default.cfg         |   9 +
 .../config-lgsm/svenserver/_default.cfg       |   9 +
 .../config-lgsm/terrariaserver/_default.cfg   |   9 +
 .../config-lgsm/tf2server/_default.cfg        |   9 +
 .../config-lgsm/tfcserver/_default.cfg        |   9 +
 .../config-lgsm/ts3server/_default.cfg        |   9 +
 .../config-lgsm/tsserver/_default.cfg         |   9 +
 .../config-lgsm/tuserver/_default.cfg         |   9 +
 .../config-lgsm/twserver/_default.cfg         |   9 +
 .../config-lgsm/untserver/_default.cfg        |   9 +
 .../config-lgsm/ut2k4server/_default.cfg      |   9 +
 .../config-lgsm/ut3server/_default.cfg        |   9 +
 .../config-lgsm/ut99server/_default.cfg       |   9 +
 .../config-lgsm/utserver/_default.cfg         |   9 +
 .../config-lgsm/vsserver/_default.cfg         |   9 +
 .../config-lgsm/wetserver/_default.cfg        |   9 +
 .../config-lgsm/wfserver/_default.cfg         |   9 +
 .../config-lgsm/wurmserver/_default.cfg       |   9 +
 .../config-lgsm/zmrserver/_default.cfg        |   9 +
 .../config-lgsm/zpsserver/_default.cfg        |   9 +
 lgsm/data/serverlist.csv                      |  42 +--
 lgsm/functions/alert.sh                       |   2 +-
 lgsm/functions/check_deps.sh                  |  16 +-
 lgsm/functions/check_ip.sh                    |   2 +-
 lgsm/functions/command_backup.sh              |   1 +
 lgsm/functions/command_debug.sh               |   1 +
 lgsm/functions/command_details.sh             |   1 +
 lgsm/functions/command_dev_clear_functions.sh |   1 +
 lgsm/functions/command_dev_debug.sh           |   1 +
 lgsm/functions/command_dev_detect_glibc.sh    |   1 +
 lgsm/functions/command_dev_query_raw.sh       |  58 ++--
 lgsm/functions/command_donate.sh              |   9 +-
 lgsm/functions/command_fastdl.sh              |   1 +
 lgsm/functions/command_install.sh             |   2 +-
 .../command_install_resources_mta.sh          |   2 +
 lgsm/functions/command_monitor.sh             | 295 ++++++++++--------
 lgsm/functions/command_postdetails.sh         |   4 +-
 lgsm/functions/command_restart.sh             |   2 +
 lgsm/functions/command_start.sh               |   5 +-
 lgsm/functions/command_stop.sh                |   4 +-
 lgsm/functions/command_test_alert.sh          |   1 +
 lgsm/functions/command_ts3_server_pass.sh     |   1 +
 lgsm/functions/command_update_linuxgsm.sh     |   2 +-
 lgsm/functions/command_validate.sh            |   1 +
 lgsm/functions/compress_unreal2_maps.sh       |   1 +
 lgsm/functions/compress_ut99_maps.sh          |   1 +
 lgsm/functions/core_messages.sh               |   4 +
 lgsm/functions/info_config.sh                 |  81 +++--
 lgsm/functions/info_messages.sh               | 160 ++++++----
 lgsm/functions/info_parms.sh                  |  47 ++-
 lgsm/functions/query_gamedig.sh               |  79 +----
 lgsm/functions/query_gsquery.py               |  23 +-
 135 files changed, 1385 insertions(+), 399 deletions(-)

diff --git a/lgsm/config-default/config-lgsm/ahl2server/_default.cfg b/lgsm/config-default/config-lgsm/ahl2server/_default.cfg
index 5d1031017..1497127b0 100644
--- a/lgsm/config-default/config-lgsm/ahl2server/_default.cfg
+++ b/lgsm/config-default/config-lgsm/ahl2server/_default.cfg
@@ -124,6 +124,15 @@ sleeptime="0.5"
 # 10: Teamspeak 3
 stopmode="3"
 
+## Query mode
+# 1: session only
+# 2: gamedig + gsquery
+# 3: gamedig
+# 4: gsquery
+# 5: tcp
+querymode="2"
+querytype="protocol-valve"
+
 ## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd
 # Server appid
 appid="985050"
diff --git a/lgsm/config-default/config-lgsm/ahlserver/_default.cfg b/lgsm/config-default/config-lgsm/ahlserver/_default.cfg
index 8aeab4fcd..9be4a37f5 100644
--- a/lgsm/config-default/config-lgsm/ahlserver/_default.cfg
+++ b/lgsm/config-default/config-lgsm/ahlserver/_default.cfg
@@ -128,6 +128,15 @@ steammaster="true"
 # 10: Teamspeak 3
 stopmode="9"
 
+## Query mode
+# 1: session only
+# 2: gamedig + gsquery
+# 3: gamedig
+# 4: gsquery
+# 5: tcp
+querymode="2"
+querytype="protocol-valve"
+
 ## Game Server Details
 # Do not edit
 gamename="Action half-life"
diff --git a/lgsm/config-default/config-lgsm/arkserver/_default.cfg b/lgsm/config-default/config-lgsm/arkserver/_default.cfg
index c5ec8b7bc..f2587f978 100644
--- a/lgsm/config-default/config-lgsm/arkserver/_default.cfg
+++ b/lgsm/config-default/config-lgsm/arkserver/_default.cfg
@@ -129,6 +129,15 @@ steammaster="true"
 # 10: Teamspeak 3
 stopmode="2"
 
+## Query mode
+# 1: session only
+# 2: gamedig + gsquery
+# 3: gamedig
+# 4: gsquery
+# 5: tcp
+querymode="2"
+querytype="protocol-valve"
+
 ## Game Server Details
 # Do not edit
 gamename="ARK: Survival Evolved"
diff --git a/lgsm/config-default/config-lgsm/arma3server/_default.cfg b/lgsm/config-default/config-lgsm/arma3server/_default.cfg
index 7f83e8427..4aee5c41d 100644
--- a/lgsm/config-default/config-lgsm/arma3server/_default.cfg
+++ b/lgsm/config-default/config-lgsm/arma3server/_default.cfg
@@ -143,6 +143,15 @@ steammaster="false"
 # 10: Teamspeak 3
 stopmode="2"
 
+## Query mode
+# 1: session only
+# 2: gamedig + gsquery
+# 3: gamedig
+# 4: gsquery
+# 5: tcp
+querymode="2"
+querytype="protocol-valve"
+
 ## Game Server Details
 # Do not edit
 gamename="ARMA 3"
diff --git a/lgsm/config-default/config-lgsm/bb2server/_default.cfg b/lgsm/config-default/config-lgsm/bb2server/_default.cfg
index c73974c56..9dfd3afd7 100644
--- a/lgsm/config-default/config-lgsm/bb2server/_default.cfg
+++ b/lgsm/config-default/config-lgsm/bb2server/_default.cfg
@@ -133,6 +133,15 @@ steammaster="true"
 # 10: Teamspeak 3
 stopmode="3"
 
+## Query mode
+# 1: session only
+# 2: gamedig + gsquery
+# 3: gamedig
+# 4: gsquery
+# 5: tcp
+querymode="2"
+querytype="protocol-valve"
+
 ## Game Server Details
 # Do not edit
 gamename="BrainBread 2"
diff --git a/lgsm/config-default/config-lgsm/bbserver/_default.cfg b/lgsm/config-default/config-lgsm/bbserver/_default.cfg
index 63fc1cee2..aa03073b8 100644
--- a/lgsm/config-default/config-lgsm/bbserver/_default.cfg
+++ b/lgsm/config-default/config-lgsm/bbserver/_default.cfg
@@ -128,6 +128,15 @@ steammaster="true"
 # 10: Teamspeak 3
 stopmode="9"
 
+## Query mode
+# 1: session only
+# 2: gamedig + gsquery
+# 3: gamedig
+# 4: gsquery
+# 5: tcp
+querymode="2"
+querytype="protocol-valve"
+
 ## Game Server Details
 # Do not edit
 gamename="BrainBread"
diff --git a/lgsm/config-default/config-lgsm/bdserver/_default.cfg b/lgsm/config-default/config-lgsm/bdserver/_default.cfg
index e9a0ccb4a..1b12ebb29 100644
--- a/lgsm/config-default/config-lgsm/bdserver/_default.cfg
+++ b/lgsm/config-default/config-lgsm/bdserver/_default.cfg
@@ -127,6 +127,15 @@ steammaster="true"
 # 10: Teamspeak 3
 stopmode="9"
 
+## Query mode
+# 1: session only
+# 2: gamedig + gsquery
+# 3: gamedig
+# 4: gsquery
+# 5: tcp
+querymode="2"
+querytype="protocol-valve"
+
 ## Game Server Details
 # Do not edit
 gamename="Base Defense"
diff --git a/lgsm/config-default/config-lgsm/bf1942server/_default.cfg b/lgsm/config-default/config-lgsm/bf1942server/_default.cfg
index 1a04f03dd..b54c300f8 100644
--- a/lgsm/config-default/config-lgsm/bf1942server/_default.cfg
+++ b/lgsm/config-default/config-lgsm/bf1942server/_default.cfg
@@ -112,6 +112,15 @@ sleeptime="0.5"
 # 10: Teamspeak 3
 stopmode="2"
 
+## Query mode
+# 1: session only
+# 2: gamedig + gsquery
+# 3: gamedig
+# 4: gsquery
+# 5: tcp
+querymode="2"
+querytype="protocol-valve"
+
 ## Game Server Details
 # Do not edit
 gamename="Battlefield: 1942"
diff --git a/lgsm/config-default/config-lgsm/bmdmserver/_default.cfg b/lgsm/config-default/config-lgsm/bmdmserver/_default.cfg
index 756f7705a..8026112ab 100644
--- a/lgsm/config-default/config-lgsm/bmdmserver/_default.cfg
+++ b/lgsm/config-default/config-lgsm/bmdmserver/_default.cfg
@@ -133,6 +133,15 @@ steammaster="true"
 # 10: Teamspeak 3
 stopmode="3"
 
+## Query mode
+# 1: session only
+# 2: gamedig + gsquery
+# 3: gamedig
+# 4: gsquery
+# 5: tcp
+querymode="2"
+querytype="protocol-valve"
+
 ## Game Server Details
 # Do not edit
 gamename="Black Mesa: Deathmatch"
diff --git a/lgsm/config-default/config-lgsm/boserver/_default.cfg b/lgsm/config-default/config-lgsm/boserver/_default.cfg
index e7d0bf4dd..0ab0986e0 100644
--- a/lgsm/config-default/config-lgsm/boserver/_default.cfg
+++ b/lgsm/config-default/config-lgsm/boserver/_default.cfg
@@ -126,6 +126,15 @@ steammaster="false"
 # 10: Teamspeak 3
 stopmode="2"
 
+## Query mode
+# 1: session only
+# 2: gamedig + gsquery
+# 3: gamedig
+# 4: gsquery
+# 5: tcp
+querymode="2"
+querytype="protocol-valve"
+
 ## Game Server Details
 # Do not edit
 gamename="Ballistic Overkill"
diff --git a/lgsm/config-default/config-lgsm/bsserver/_default.cfg b/lgsm/config-default/config-lgsm/bsserver/_default.cfg
index 4eac8cb6e..ceab458a7 100644
--- a/lgsm/config-default/config-lgsm/bsserver/_default.cfg
+++ b/lgsm/config-default/config-lgsm/bsserver/_default.cfg
@@ -137,6 +137,15 @@ steammaster="true"
 # 10: Teamspeak 3
 stopmode="3"
 
+## Query mode
+# 1: session only
+# 2: gamedig + gsquery
+# 3: gamedig
+# 4: gsquery
+# 5: tcp
+querymode="2"
+querytype="protocol-valve"
+
 ## Game Server Details
 # Do not edit
 gamename="Blade Symphony"
diff --git a/lgsm/config-default/config-lgsm/bt1944server/_default.cfg b/lgsm/config-default/config-lgsm/bt1944server/_default.cfg
index 6629e8263..c93336ca9 100644
--- a/lgsm/config-default/config-lgsm/bt1944server/_default.cfg
+++ b/lgsm/config-default/config-lgsm/bt1944server/_default.cfg
@@ -125,6 +125,15 @@ steammaster="false"
 # 10: Teamspeak 3
 stopmode="2"
 
+## Query mode
+# 1: session only
+# 2: gamedig + gsquery
+# 3: gamedig
+# 4: gsquery
+# 5: tcp
+querymode="2"
+querytype="protocol-valve"
+
 ## Game Server Details
 # Do not edit
 gamename="Battalion 1944"
diff --git a/lgsm/config-default/config-lgsm/btserver/_default.cfg b/lgsm/config-default/config-lgsm/btserver/_default.cfg
index c1edf3d34..772a8dfe2 100644
--- a/lgsm/config-default/config-lgsm/btserver/_default.cfg
+++ b/lgsm/config-default/config-lgsm/btserver/_default.cfg
@@ -120,6 +120,15 @@ steammaster="true"
 # 10: Teamspeak 3
 stopmode="7"
 
+## Query mode
+# 1: session only
+# 2: gamedig + gsquery
+# 3: gamedig
+# 4: gsquery
+# 5: tcp
+querymode="2"
+querytype="protocol-valve"
+
 ## Game Server Details
 # Do not edit
 gamename="Barotrauma"
diff --git a/lgsm/config-default/config-lgsm/ccserver/_default.cfg b/lgsm/config-default/config-lgsm/ccserver/_default.cfg
index 230c64250..d2e964299 100644
--- a/lgsm/config-default/config-lgsm/ccserver/_default.cfg
+++ b/lgsm/config-default/config-lgsm/ccserver/_default.cfg
@@ -128,6 +128,15 @@ steammaster="false"
 # 10: Teamspeak 3
 stopmode="3"
 
+## Query mode
+# 1: session only
+# 2: gamedig + gsquery
+# 3: gamedig
+# 4: gsquery
+# 5: tcp
+querymode="2"
+querytype="protocol-valve"
+
 ## Game Server Details
 # Do not edit
 gamename="Codename CURE"
diff --git a/lgsm/config-default/config-lgsm/cod2server/_default.cfg b/lgsm/config-default/config-lgsm/cod2server/_default.cfg
index f3b1e48c1..e3237eb2b 100644
--- a/lgsm/config-default/config-lgsm/cod2server/_default.cfg
+++ b/lgsm/config-default/config-lgsm/cod2server/_default.cfg
@@ -115,6 +115,15 @@ sleeptime="0.5"
 # 10: Teamspeak 3
 stopmode="3"
 
+## Query mode
+# 1: session only
+# 2: gamedig + gsquery
+# 3: gamedig
+# 4: gsquery
+# 5: tcp
+querymode="2"
+querytype="protocol-quake3"
+
 ## Game Server Details
 # Do not edit
 gamename="Call of Duty 2"
diff --git a/lgsm/config-default/config-lgsm/cod4server/_default.cfg b/lgsm/config-default/config-lgsm/cod4server/_default.cfg
index 56d7f4aaf..1cc245ef8 100644
--- a/lgsm/config-default/config-lgsm/cod4server/_default.cfg
+++ b/lgsm/config-default/config-lgsm/cod4server/_default.cfg
@@ -115,6 +115,15 @@ sleeptime="0.5"
 # 10: Teamspeak 3
 stopmode="3"
 
+## Query mode
+# 1: session only
+# 2: gamedig + gsquery
+# 3: gamedig
+# 4: gsquery
+# 5: tcp
+querymode="2"
+querytype="protocol-quake3"
+
 ## Game Server Details
 # Do not edit
 gamename="Call of Duty 4"
diff --git a/lgsm/config-default/config-lgsm/codserver/_default.cfg b/lgsm/config-default/config-lgsm/codserver/_default.cfg
index 31fe03d8c..9ca4a33bd 100644
--- a/lgsm/config-default/config-lgsm/codserver/_default.cfg
+++ b/lgsm/config-default/config-lgsm/codserver/_default.cfg
@@ -115,6 +115,15 @@ sleeptime="0.5"
 # 10: Teamspeak 3
 stopmode="3"
 
+## Query mode
+# 1: session only
+# 2: gamedig + gsquery
+# 3: gamedig
+# 4: gsquery
+# 5: tcp
+querymode="2"
+querytype="protocol-quake3"
+
 ## Game Server Details
 # Do not edit
 gamename="Call of Duty"
diff --git a/lgsm/config-default/config-lgsm/coduoserver/_default.cfg b/lgsm/config-default/config-lgsm/coduoserver/_default.cfg
index c0274d899..86da8fdc2 100644
--- a/lgsm/config-default/config-lgsm/coduoserver/_default.cfg
+++ b/lgsm/config-default/config-lgsm/coduoserver/_default.cfg
@@ -115,6 +115,15 @@ sleeptime="0.5"
 # 10: Teamspeak 3
 stopmode="3"
 
+## Query mode
+# 1: session only
+# 2: gamedig + gsquery
+# 3: gamedig
+# 4: gsquery
+# 5: tcp
+querymode="2"
+querytype="protocol-quake3"
+
 ## Game Server Details
 # Do not edit
 gamename="Call of Duty: United Offensive"
diff --git a/lgsm/config-default/config-lgsm/codwawserver/_default.cfg b/lgsm/config-default/config-lgsm/codwawserver/_default.cfg
index 751a3bb41..81d5bdb68 100644
--- a/lgsm/config-default/config-lgsm/codwawserver/_default.cfg
+++ b/lgsm/config-default/config-lgsm/codwawserver/_default.cfg
@@ -115,6 +115,15 @@ sleeptime="0.5"
 # 10: Teamspeak 3
 stopmode="3"
 
+## Query mode
+# 1: session only
+# 2: gamedig + gsquery
+# 3: gamedig
+# 4: gsquery
+# 5: tcp
+querymode="2"
+querytype="protocol-quake3"
+
 ## Game Server Details
 # Do not edit
 gamename="Call of Duty: World at War"
diff --git a/lgsm/config-default/config-lgsm/csczserver/_default.cfg b/lgsm/config-default/config-lgsm/csczserver/_default.cfg
index 039e0409c..8cf8f7f24 100644
--- a/lgsm/config-default/config-lgsm/csczserver/_default.cfg
+++ b/lgsm/config-default/config-lgsm/csczserver/_default.cfg
@@ -128,6 +128,15 @@ steammaster="true"
 # 10: Teamspeak 3
 stopmode="9"
 
+## Query mode
+# 1: session only
+# 2: gamedig + gsquery
+# 3: gamedig
+# 4: gsquery
+# 5: tcp
+querymode="2"
+querytype="protocol-valve"
+
 ## Game Server Details
 # Do not edit
 gamename="Counter-Strike: Condition Zero"
diff --git a/lgsm/config-default/config-lgsm/csgoserver/_default.cfg b/lgsm/config-default/config-lgsm/csgoserver/_default.cfg
index db3e27811..ac5c9c392 100644
--- a/lgsm/config-default/config-lgsm/csgoserver/_default.cfg
+++ b/lgsm/config-default/config-lgsm/csgoserver/_default.cfg
@@ -153,6 +153,15 @@ steammaster="true"
 # 10: Teamspeak 3
 stopmode="3"
 
+## Query mode
+# 1: session only
+# 2: gamedig + gsquery
+# 3: gamedig
+# 4: gsquery
+# 5: tcp
+querymode="2"
+querytype="protocol-valve"
+
 ## Game Server Details
 # Do not edit
 gamename="Counter-Strike: Global Offensive"
diff --git a/lgsm/config-default/config-lgsm/csserver/_default.cfg b/lgsm/config-default/config-lgsm/csserver/_default.cfg
index fef0d8bb9..107110881 100644
--- a/lgsm/config-default/config-lgsm/csserver/_default.cfg
+++ b/lgsm/config-default/config-lgsm/csserver/_default.cfg
@@ -128,6 +128,15 @@ steammaster="true"
 # 10: Teamspeak 3
 stopmode="9"
 
+## Query mode
+# 1: session only
+# 2: gamedig + gsquery
+# 3: gamedig
+# 4: gsquery
+# 5: tcp
+querymode="2"
+querytype="protocol-valve"
+
 ## Game Server Details
 # Do not edit
 gamename="Counter-Strike 1.6"
diff --git a/lgsm/config-default/config-lgsm/cssserver/_default.cfg b/lgsm/config-default/config-lgsm/cssserver/_default.cfg
index 2ef39d44c..f05845fef 100644
--- a/lgsm/config-default/config-lgsm/cssserver/_default.cfg
+++ b/lgsm/config-default/config-lgsm/cssserver/_default.cfg
@@ -133,6 +133,15 @@ steammaster="true"
 # 10: Teamspeak 3
 stopmode="3"
 
+## Query mode
+# 1: session only
+# 2: gamedig + gsquery
+# 3: gamedig
+# 4: gsquery
+# 5: tcp
+querymode="2"
+querytype="protocol-valve"
+
 ## Game Server Details
 # Do not edit
 gamename="Counter-Strike: Source"
diff --git a/lgsm/config-default/config-lgsm/dabserver/_default.cfg b/lgsm/config-default/config-lgsm/dabserver/_default.cfg
index 2340eb63a..feaa53597 100644
--- a/lgsm/config-default/config-lgsm/dabserver/_default.cfg
+++ b/lgsm/config-default/config-lgsm/dabserver/_default.cfg
@@ -128,6 +128,15 @@ steammaster="true"
 # 10: Teamspeak 3
 stopmode="3"
 
+## Query mode
+# 1: session only
+# 2: gamedig + gsquery
+# 3: gamedig
+# 4: gsquery
+# 5: tcp
+querymode="2"
+querytype="protocol-valve"
+
 ## Game Server Details
 # Do not edit
 gamename="Double Action: Boogaloo"
diff --git a/lgsm/config-default/config-lgsm/dmcserver/_default.cfg b/lgsm/config-default/config-lgsm/dmcserver/_default.cfg
index a9561dc37..5510df840 100644
--- a/lgsm/config-default/config-lgsm/dmcserver/_default.cfg
+++ b/lgsm/config-default/config-lgsm/dmcserver/_default.cfg
@@ -128,6 +128,15 @@ steammaster="true"
 # 10: Teamspeak 3
 stopmode="9"
 
+## Query mode
+# 1: session only
+# 2: gamedig + gsquery
+# 3: gamedig
+# 4: gsquery
+# 5: tcp
+querymode="2"
+querytype="protocol-valve"
+
 ## Game Server Details
 # Do not edit
 gamename="Deathmatch Classic"
diff --git a/lgsm/config-default/config-lgsm/dodserver/_default.cfg b/lgsm/config-default/config-lgsm/dodserver/_default.cfg
index 3a9afe284..d6aae8134 100644
--- a/lgsm/config-default/config-lgsm/dodserver/_default.cfg
+++ b/lgsm/config-default/config-lgsm/dodserver/_default.cfg
@@ -128,6 +128,15 @@ steammaster="true"
 # 10: Teamspeak 3
 stopmode="9"
 
+## Query mode
+# 1: session only
+# 2: gamedig + gsquery
+# 3: gamedig
+# 4: gsquery
+# 5: tcp
+querymode="2"
+querytype="protocol-valve"
+
 ## Game Server Details
 # Do not edit
 gamename="Day of Defeat"
diff --git a/lgsm/config-default/config-lgsm/dodsserver/_default.cfg b/lgsm/config-default/config-lgsm/dodsserver/_default.cfg
index ca6391872..909ee3264 100644
--- a/lgsm/config-default/config-lgsm/dodsserver/_default.cfg
+++ b/lgsm/config-default/config-lgsm/dodsserver/_default.cfg
@@ -128,6 +128,15 @@ steammaster="true"
 # 10: Teamspeak 3
 stopmode="3"
 
+## Query mode
+# 1: session only
+# 2: gamedig + gsquery
+# 3: gamedig
+# 4: gsquery
+# 5: tcp
+querymode="2"
+querytype="protocol-valve"
+
 ## Game Server Details
 # Do not edit
 gamename="Day of Defeat: Source"
diff --git a/lgsm/config-default/config-lgsm/doiserver/_default.cfg b/lgsm/config-default/config-lgsm/doiserver/_default.cfg
index ac3feb41c..cd749eadf 100644
--- a/lgsm/config-default/config-lgsm/doiserver/_default.cfg
+++ b/lgsm/config-default/config-lgsm/doiserver/_default.cfg
@@ -129,6 +129,15 @@ steammaster="true"
 # 10: Teamspeak 3
 stopmode="3"
 
+## Query mode
+# 1: session only
+# 2: gamedig + gsquery
+# 3: gamedig
+# 4: gsquery
+# 5: tcp
+querymode="2"
+querytype="protocol-valve"
+
 ## Game Server Details
 # Do not edit
 gamename="Day of Infamy"
diff --git a/lgsm/config-default/config-lgsm/dstserver/_default.cfg b/lgsm/config-default/config-lgsm/dstserver/_default.cfg
index f25a4ff70..90e2c433d 100644
--- a/lgsm/config-default/config-lgsm/dstserver/_default.cfg
+++ b/lgsm/config-default/config-lgsm/dstserver/_default.cfg
@@ -131,6 +131,15 @@ steammaster="false"
 # 10: Teamspeak 3
 stopmode="2"
 
+## Query mode
+# 1: session only
+# 2: gamedig + gsquery
+# 3: gamedig
+# 4: gsquery
+# 5: tcp
+querymode="1"
+querytype=""
+
 ## Game Server Details
 # Do not edit
 gamename="Don't Starve Together"
diff --git a/lgsm/config-default/config-lgsm/dysserver/_default.cfg b/lgsm/config-default/config-lgsm/dysserver/_default.cfg
index fbbc847fd..c4eca188e 100644
--- a/lgsm/config-default/config-lgsm/dysserver/_default.cfg
+++ b/lgsm/config-default/config-lgsm/dysserver/_default.cfg
@@ -133,6 +133,15 @@ steammaster="true"
 # 10: Teamspeak 3
 stopmode="3"
 
+## Query mode
+# 1: session only
+# 2: gamedig + gsquery
+# 3: gamedig
+# 4: gsquery
+# 5: tcp
+querymode="2"
+querytype="protocol-valve"
+
 ## Game Server Details
 # Do not edit
 gamename="Dystopia"
diff --git a/lgsm/config-default/config-lgsm/ecoserver/_default.cfg b/lgsm/config-default/config-lgsm/ecoserver/_default.cfg
index 145a2a547..509b866d1 100644
--- a/lgsm/config-default/config-lgsm/ecoserver/_default.cfg
+++ b/lgsm/config-default/config-lgsm/ecoserver/_default.cfg
@@ -120,6 +120,15 @@ steammaster="false"
 # 10: Teamspeak 3
 stopmode="2"
 
+## Query mode
+# 1: session only
+# 2: gamedig + gsquery
+# 3: gamedig
+# 4: gsquery
+# 5: tcp
+querymode="1"
+querytype=""
+
 ## Game Server Details
 # Do not edit
 gamename="Eco"
diff --git a/lgsm/config-default/config-lgsm/emserver/_default.cfg b/lgsm/config-default/config-lgsm/emserver/_default.cfg
index abd75f12d..fed82c6d2 100644
--- a/lgsm/config-default/config-lgsm/emserver/_default.cfg
+++ b/lgsm/config-default/config-lgsm/emserver/_default.cfg
@@ -133,6 +133,15 @@ steammaster="true"
 # 10: Teamspeak 3
 stopmode="3"
 
+## Query mode
+# 1: session only
+# 2: gamedig + gsquery
+# 3: gamedig
+# 4: gsquery
+# 5: tcp
+querymode="2"
+querytype="protocol-valve"
+
 ## Game Server Details
 # Do not edit
 gamename="Empires Mod"
diff --git a/lgsm/config-default/config-lgsm/etlserver/_default.cfg b/lgsm/config-default/config-lgsm/etlserver/_default.cfg
index 3e2cb2bd6..e2aa5ced2 100644
--- a/lgsm/config-default/config-lgsm/etlserver/_default.cfg
+++ b/lgsm/config-default/config-lgsm/etlserver/_default.cfg
@@ -109,6 +109,15 @@ sleeptime="0.5"
 # 10: Teamspeak 3
 stopmode="3"
 
+## Query mode
+# 1: session only
+# 2: gamedig + gsquery
+# 3: gamedig
+# 4: gsquery
+# 5: tcp
+querymode="2"
+querytype="protocol-quake3"
+
 ## Game Server Details
 # Do not edit
 gamename="ET: Legacy"
diff --git a/lgsm/config-default/config-lgsm/fctrserver/_default.cfg b/lgsm/config-default/config-lgsm/fctrserver/_default.cfg
index 6eb8988c7..0bccfdd42 100644
--- a/lgsm/config-default/config-lgsm/fctrserver/_default.cfg
+++ b/lgsm/config-default/config-lgsm/fctrserver/_default.cfg
@@ -120,6 +120,15 @@ sleeptime="0.5"
 # 10: Teamspeak 3
 stopmode="2"
 
+## Query mode
+# 1: session only
+# 2: gamedig + gsquery
+# 3: gamedig
+# 4: gsquery
+# 5: tcp
+querymode="1"
+querytype=""
+
 ## Game Server Details
 # Do not edit
 gamename="Factorio"
diff --git a/lgsm/config-default/config-lgsm/fofserver/_default.cfg b/lgsm/config-default/config-lgsm/fofserver/_default.cfg
index 26a043dcc..485259292 100644
--- a/lgsm/config-default/config-lgsm/fofserver/_default.cfg
+++ b/lgsm/config-default/config-lgsm/fofserver/_default.cfg
@@ -128,6 +128,15 @@ steammaster="true"
 # 10: Teamspeak 3
 stopmode="3"
 
+## Query mode
+# 1: session only
+# 2: gamedig + gsquery
+# 3: gamedig
+# 4: gsquery
+# 5: tcp
+querymode="2"
+querytype="protocol-valve"
+
 ## Game Server Details
 # Do not edit
 gamename="Fistful of Frags"
diff --git a/lgsm/config-default/config-lgsm/gesserver/_default.cfg b/lgsm/config-default/config-lgsm/gesserver/_default.cfg
index 5c91c62cc..41282bbc7 100644
--- a/lgsm/config-default/config-lgsm/gesserver/_default.cfg
+++ b/lgsm/config-default/config-lgsm/gesserver/_default.cfg
@@ -128,6 +128,15 @@ steammaster="true"
 # 10: Teamspeak 3
 stopmode="3"
 
+## Query mode
+# 1: session only
+# 2: gamedig + gsquery
+# 3: gamedig
+# 4: gsquery
+# 5: tcp
+querymode="2"
+querytype="protocol-valve"
+
 ## Game Server Details
 # Do not edit
 gamename="GoldenEye: Source"
diff --git a/lgsm/config-default/config-lgsm/gmodserver/_default.cfg b/lgsm/config-default/config-lgsm/gmodserver/_default.cfg
index f0be94ba4..1723df183 100644
--- a/lgsm/config-default/config-lgsm/gmodserver/_default.cfg
+++ b/lgsm/config-default/config-lgsm/gmodserver/_default.cfg
@@ -144,6 +144,15 @@ steammaster="true"
 # 10: Teamspeak 3
 stopmode="3"
 
+## Query mode
+# 1: session only
+# 2: gamedig + gsquery
+# 3: gamedig
+# 4: gsquery
+# 5: tcp
+querymode="2"
+querytype="protocol-valve"
+
 ## Game Server Details
 # Do not edit
 gamename="Garry's Mod"
diff --git a/lgsm/config-default/config-lgsm/hl2dmserver/_default.cfg b/lgsm/config-default/config-lgsm/hl2dmserver/_default.cfg
index e3a8827c5..8fd962136 100644
--- a/lgsm/config-default/config-lgsm/hl2dmserver/_default.cfg
+++ b/lgsm/config-default/config-lgsm/hl2dmserver/_default.cfg
@@ -128,6 +128,15 @@ steammaster="true"
 # 10: Teamspeak 3
 stopmode="3"
 
+## Query mode
+# 1: session only
+# 2: gamedig + gsquery
+# 3: gamedig
+# 4: gsquery
+# 5: tcp
+querymode="2"
+querytype="protocol-valve"
+
 ## Game Server Details
 # Do not edit
 gamename="Half Life 2: Deathmatch"
diff --git a/lgsm/config-default/config-lgsm/hldmserver/_default.cfg b/lgsm/config-default/config-lgsm/hldmserver/_default.cfg
index 46ccbe72b..8e1ddd8e6 100644
--- a/lgsm/config-default/config-lgsm/hldmserver/_default.cfg
+++ b/lgsm/config-default/config-lgsm/hldmserver/_default.cfg
@@ -127,6 +127,15 @@ steammaster="true"
 # 10: Teamspeak 3
 stopmode="9"
 
+## Query mode
+# 1: session only
+# 2: gamedig + gsquery
+# 3: gamedig
+# 4: gsquery
+# 5: tcp
+querymode="2"
+querytype="protocol-valve"
+
 ## Game Server Details
 # Do not edit
 gamename="Half Life: Deathmatch"
diff --git a/lgsm/config-default/config-lgsm/hldmsserver/_default.cfg b/lgsm/config-default/config-lgsm/hldmsserver/_default.cfg
index 2faea0e45..dd7c93012 100644
--- a/lgsm/config-default/config-lgsm/hldmsserver/_default.cfg
+++ b/lgsm/config-default/config-lgsm/hldmsserver/_default.cfg
@@ -128,6 +128,15 @@ steammaster="true"
 # 10: Teamspeak 3
 stopmode="3"
 
+## Query mode
+# 1: session only
+# 2: gamedig + gsquery
+# 3: gamedig
+# 4: gsquery
+# 5: tcp
+querymode="2"
+querytype="protocol-valve"
+
 ## Game Server Details
 # Do not edit
 gamename="Half-Life Deathmatch: Source"
diff --git a/lgsm/config-default/config-lgsm/hwserver/_default.cfg b/lgsm/config-default/config-lgsm/hwserver/_default.cfg
index 08cd3753b..a5010d101 100644
--- a/lgsm/config-default/config-lgsm/hwserver/_default.cfg
+++ b/lgsm/config-default/config-lgsm/hwserver/_default.cfg
@@ -139,6 +139,15 @@ steammaster="false"
 # 10: Teamspeak 3
 stopmode="2"
 
+## Query mode
+# 1: session only
+# 2: gamedig + gsquery
+# 3: gamedig
+# 4: gsquery
+# 5: tcp
+querymode="2"
+querytype="protocol-valve"
+
 ## Game Server Details
 # Do not edit
 gamename="Hurtworld"
diff --git a/lgsm/config-default/config-lgsm/insserver/_default.cfg b/lgsm/config-default/config-lgsm/insserver/_default.cfg
index 15a740637..bedda2359 100644
--- a/lgsm/config-default/config-lgsm/insserver/_default.cfg
+++ b/lgsm/config-default/config-lgsm/insserver/_default.cfg
@@ -134,6 +134,15 @@ steammaster="false"
 # 10: Teamspeak 3
 stopmode="3"
 
+## Query mode
+# 1: session only
+# 2: gamedig + gsquery
+# 3: gamedig
+# 4: gsquery
+# 5: tcp
+querymode="2"
+querytype="protocol-valve"
+
 ## Game Server Details
 # Do not edit
 gamename="Insurgency"
diff --git a/lgsm/config-default/config-lgsm/inssserver/_default.cfg b/lgsm/config-default/config-lgsm/inssserver/_default.cfg
index 80855fc13..fedd3b163 100644
--- a/lgsm/config-default/config-lgsm/inssserver/_default.cfg
+++ b/lgsm/config-default/config-lgsm/inssserver/_default.cfg
@@ -135,6 +135,15 @@ steammaster="false"
 # 10: Teamspeak 3
 stopmode="2"
 
+## Query mode
+# 1: session only
+# 2: gamedig + gsquery
+# 3: gamedig
+# 4: gsquery
+# 5: tcp
+querymode="2"
+querytype="protocol-valve"
+
 ## Game Server Details
 # Do not edit
 gamename="Insurgency: Sandstorm"
diff --git a/lgsm/config-default/config-lgsm/iosserver/_default.cfg b/lgsm/config-default/config-lgsm/iosserver/_default.cfg
index 907ea3c77..94f7a90a2 100644
--- a/lgsm/config-default/config-lgsm/iosserver/_default.cfg
+++ b/lgsm/config-default/config-lgsm/iosserver/_default.cfg
@@ -128,6 +128,15 @@ steammaster="false"
 # 10: Teamspeak 3
 stopmode="3"
 
+## Query mode
+# 1: session only
+# 2: gamedig + gsquery
+# 3: gamedig
+# 4: gsquery
+# 5: tcp
+querymode="2"
+querytype="protocol-valve"
+
 ## Game Server Details
 # Do not edit
 gamename="IOSoccer"
diff --git a/lgsm/config-default/config-lgsm/jc2server/_default.cfg b/lgsm/config-default/config-lgsm/jc2server/_default.cfg
index 24375440e..bf2f16043 100644
--- a/lgsm/config-default/config-lgsm/jc2server/_default.cfg
+++ b/lgsm/config-default/config-lgsm/jc2server/_default.cfg
@@ -120,6 +120,15 @@ steammaster="true"
 # 10: Teamspeak 3
 stopmode="2"
 
+## Query mode
+# 1: session only
+# 2: gamedig + gsquery
+# 3: gamedig
+# 4: gsquery
+# 5: tcp
+querymode="2"
+querytype="jc2mp"
+
 ## Game Server Details
 # Do not edit
 gamename="Just Cause 2"
diff --git a/lgsm/config-default/config-lgsm/jc3server/_default.cfg b/lgsm/config-default/config-lgsm/jc3server/_default.cfg
index d2c4cffd0..4dbbf5752 100644
--- a/lgsm/config-default/config-lgsm/jc3server/_default.cfg
+++ b/lgsm/config-default/config-lgsm/jc3server/_default.cfg
@@ -120,6 +120,15 @@ steammaster="false"
 # 10: Teamspeak 3
 stopmode="2"
 
+## Query mode
+# 1: session only
+# 2: gamedig + gsquery
+# 3: gamedig
+# 4: gsquery
+# 5: tcp
+querymode="2"
+querytype="protocol-valve"
+
 ## Game Server Details
 # Do not edit
 gamename="Just Cause 3"
diff --git a/lgsm/config-default/config-lgsm/kf2server/_default.cfg b/lgsm/config-default/config-lgsm/kf2server/_default.cfg
index 2f7e596cd..76cc4da40 100644
--- a/lgsm/config-default/config-lgsm/kf2server/_default.cfg
+++ b/lgsm/config-default/config-lgsm/kf2server/_default.cfg
@@ -126,6 +126,15 @@ steammaster="false"
 # 10: Teamspeak 3
 stopmode="2"
 
+## Query mode
+# 1: session only
+# 2: gamedig + gsquery
+# 3: gamedig
+# 4: gsquery
+# 5: tcp
+querymode="2"
+querytype="protocol-valve"
+
 ## Game Server Details
 # Do not edit
 gamename="Killing Floor 2"
diff --git a/lgsm/config-default/config-lgsm/kfserver/_default.cfg b/lgsm/config-default/config-lgsm/kfserver/_default.cfg
index b39060c77..53167ac42 100644
--- a/lgsm/config-default/config-lgsm/kfserver/_default.cfg
+++ b/lgsm/config-default/config-lgsm/kfserver/_default.cfg
@@ -132,6 +132,15 @@ steammaster="false"
 # 10: Teamspeak 3
 stopmode="2"
 
+## Query mode
+# 1: session only
+# 2: gamedig + gsquery
+# 3: gamedig
+# 4: gsquery
+# 5: tcp
+querymode="2"
+querytype="protocol-unreal2"
+
 ## Game Server Details
 # Do not edit
 gamename="Killing Floor"
diff --git a/lgsm/config-default/config-lgsm/l4d2server/_default.cfg b/lgsm/config-default/config-lgsm/l4d2server/_default.cfg
index 0f7baddef..fe32362de 100644
--- a/lgsm/config-default/config-lgsm/l4d2server/_default.cfg
+++ b/lgsm/config-default/config-lgsm/l4d2server/_default.cfg
@@ -127,6 +127,15 @@ steammaster="false"
 # 10: Teamspeak 3
 stopmode="3"
 
+## Query mode
+# 1: session only
+# 2: gamedig + gsquery
+# 3: gamedig
+# 4: gsquery
+# 5: tcp
+querymode="2"
+querytype="protocol-valve"
+
 ## Game Server Details
 # Do not edit
 gamename="Left 4 Dead 2"
diff --git a/lgsm/config-default/config-lgsm/l4dserver/_default.cfg b/lgsm/config-default/config-lgsm/l4dserver/_default.cfg
index ef89de26c..333eecff0 100644
--- a/lgsm/config-default/config-lgsm/l4dserver/_default.cfg
+++ b/lgsm/config-default/config-lgsm/l4dserver/_default.cfg
@@ -127,6 +127,15 @@ steammaster="false"
 # 10: Teamspeak 3
 stopmode="2"
 
+## Query mode
+# 1: session only
+# 2: gamedig + gsquery
+# 3: gamedig
+# 4: gsquery
+# 5: tcp
+querymode="2"
+querytype="protocol-valve"
+
 ## Game Server Details
 # Do not edit
 gamename="Left 4 Dead"
diff --git a/lgsm/config-default/config-lgsm/mcserver/_default.cfg b/lgsm/config-default/config-lgsm/mcserver/_default.cfg
index d351d9fc6..2592abae9 100644
--- a/lgsm/config-default/config-lgsm/mcserver/_default.cfg
+++ b/lgsm/config-default/config-lgsm/mcserver/_default.cfg
@@ -114,6 +114,15 @@ sleeptime="0.5"
 # 10: Teamspeak 3
 stopmode="5"
 
+## Query mode
+# 1: session only
+# 2: gamedig + gsquery
+# 3: gamedig
+# 4: gsquery
+# 5: tcp
+querymode="2"
+querytype="minecraft"
+
 ## Game Server Details
 # Do not edit
 gamename="Minecraft"
diff --git a/lgsm/config-default/config-lgsm/mhserver/_default.cfg b/lgsm/config-default/config-lgsm/mhserver/_default.cfg
index 72e85d80e..dcb62846b 100644
--- a/lgsm/config-default/config-lgsm/mhserver/_default.cfg
+++ b/lgsm/config-default/config-lgsm/mhserver/_default.cfg
@@ -128,6 +128,15 @@ steammaster="false"
 # 10: Teamspeak 3
 stopmode="2"
 
+## Query mode
+# 1: session only
+# 2: gamedig + gsquery
+# 3: gamedig
+# 4: gsquery
+# 5: tcp
+querymode="2"
+querytype="protocol-valve"
+
 ## Game Server Details
 # Do not edit
 gamename="MORDHAU"
diff --git a/lgsm/config-default/config-lgsm/mohaaserver/_default.cfg b/lgsm/config-default/config-lgsm/mohaaserver/_default.cfg
index 46c59e4fa..ef694b056 100644
--- a/lgsm/config-default/config-lgsm/mohaaserver/_default.cfg
+++ b/lgsm/config-default/config-lgsm/mohaaserver/_default.cfg
@@ -114,6 +114,15 @@ sleeptime="0.5"
 # 10: Teamspeak 3
 stopmode="3"
 
+## Query mode
+# 1: session only
+# 2: gamedig + gsquery
+# 3: gamedig
+# 4: gsquery
+# 5: tcp
+querymode="2"
+querytype="protocol-quake3"
+
 ## Game Server Details
 # Do not edit
 gamename="Medal of Honor: Allied Assault"
diff --git a/lgsm/config-default/config-lgsm/mtaserver/_default.cfg b/lgsm/config-default/config-lgsm/mtaserver/_default.cfg
index cc73a9efb..6ceacf035 100644
--- a/lgsm/config-default/config-lgsm/mtaserver/_default.cfg
+++ b/lgsm/config-default/config-lgsm/mtaserver/_default.cfg
@@ -8,6 +8,9 @@
 
 #### Game Server Settings ####
 
+## Server Start Settings | https://docs.linuxgsm.com/configuration/start-parameters
+ip="0.0.0.0"
+
 ## Server Start Command | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters
 # Edit with care
 fn_parms(){
@@ -110,6 +113,15 @@ sleeptime="0.5"
 # 10: Teamspeak 3
 stopmode="4"
 
+## Query mode
+# 1: session only
+# 2: gamedig + gsquery
+# 3: gamedig
+# 4: gsquery
+# 5: tcp
+querymode="3"
+querytype="protocol-ase"
+
 ## Game Server Details
 # Do not edit
 gamename="Multi Theft Auto"
diff --git a/lgsm/config-default/config-lgsm/mumbleserver/_default.cfg b/lgsm/config-default/config-lgsm/mumbleserver/_default.cfg
index 91f946aca..204099ad9 100644
--- a/lgsm/config-default/config-lgsm/mumbleserver/_default.cfg
+++ b/lgsm/config-default/config-lgsm/mumbleserver/_default.cfg
@@ -113,6 +113,15 @@ sleeptime="0.5"
 # 10: Teamspeak 3
 stopmode="2"
 
+## Query mode
+# 1: session only
+# 2: gamedig + gsquery
+# 3: gamedig
+# 4: gsquery
+# 5: tcp
+querymode="2"
+querytype="mumbleping"
+
 ## Game Server Details
 # Do not edit
 gamename="Mumble"
diff --git a/lgsm/config-default/config-lgsm/ndserver/_default.cfg b/lgsm/config-default/config-lgsm/ndserver/_default.cfg
index 765257bc7..1ce879e7d 100644
--- a/lgsm/config-default/config-lgsm/ndserver/_default.cfg
+++ b/lgsm/config-default/config-lgsm/ndserver/_default.cfg
@@ -128,6 +128,15 @@ steammaster="true"
 # 10: Teamspeak 3
 stopmode="3"
 
+## Query mode
+# 1: session only
+# 2: gamedig + gsquery
+# 3: gamedig
+# 4: gsquery
+# 5: tcp
+querymode="2"
+querytype="protocol-valve"
+
 ## Game Server Details
 # Do not edit
 gamename="Nuclear Dawn"
diff --git a/lgsm/config-default/config-lgsm/nmrihserver/_default.cfg b/lgsm/config-default/config-lgsm/nmrihserver/_default.cfg
index 9ca9fb8c6..1ebf4d83c 100644
--- a/lgsm/config-default/config-lgsm/nmrihserver/_default.cfg
+++ b/lgsm/config-default/config-lgsm/nmrihserver/_default.cfg
@@ -133,6 +133,15 @@ steammaster="true"
 # 10: Teamspeak 3
 stopmode="3"
 
+## Query mode
+# 1: session only
+# 2: gamedig + gsquery
+# 3: gamedig
+# 4: gsquery
+# 5: tcp
+querymode="2"
+querytype="protocol-valve"
+
 ## Game Server Details
 # Do not edit
 gamename="No More Room in Hell"
diff --git a/lgsm/config-default/config-lgsm/ns2cserver/_default.cfg b/lgsm/config-default/config-lgsm/ns2cserver/_default.cfg
index f48479f70..083df023f 100644
--- a/lgsm/config-default/config-lgsm/ns2cserver/_default.cfg
+++ b/lgsm/config-default/config-lgsm/ns2cserver/_default.cfg
@@ -135,6 +135,15 @@ steammaster="true"
 # 10: Teamspeak 3
 stopmode="6"
 
+## Query mode
+# 1: session only
+# 2: gamedig + gsquery
+# 3: gamedig
+# 4: gsquery
+# 5: tcp
+querymode="2"
+querytype="protocol-valve"
+
 ## Game Server Details
 # Do not edit
 gamename="NS2: Combat"
diff --git a/lgsm/config-default/config-lgsm/ns2server/_default.cfg b/lgsm/config-default/config-lgsm/ns2server/_default.cfg
index 86e8ab539..34f1958ae 100644
--- a/lgsm/config-default/config-lgsm/ns2server/_default.cfg
+++ b/lgsm/config-default/config-lgsm/ns2server/_default.cfg
@@ -139,6 +139,15 @@ steammaster="true"
 # 10: Teamspeak 3
 stopmode="6"
 
+## Query mode
+# 1: session only
+# 2: gamedig + gsquery
+# 3: gamedig
+# 4: gsquery
+# 5: tcp
+querymode="2"
+querytype="protocol-valve"
+
 ## Game Server Details
 # Do not edit
 gamename="Natural Selection 2"
diff --git a/lgsm/config-default/config-lgsm/nsserver/_default.cfg b/lgsm/config-default/config-lgsm/nsserver/_default.cfg
index e72834f72..3e02c5f5f 100644
--- a/lgsm/config-default/config-lgsm/nsserver/_default.cfg
+++ b/lgsm/config-default/config-lgsm/nsserver/_default.cfg
@@ -128,6 +128,15 @@ steammaster="true"
 # 10: Teamspeak 3
 stopmode="9"
 
+## Query mode
+# 1: session only
+# 2: gamedig + gsquery
+# 3: gamedig
+# 4: gsquery
+# 5: tcp
+querymode="2"
+querytype="protocol-valve"
+
 ## Game Server Details
 # Do not edit
 gamename="Natural Selection"
diff --git a/lgsm/config-default/config-lgsm/opforserver/_default.cfg b/lgsm/config-default/config-lgsm/opforserver/_default.cfg
index 687eb4de4..9b4d9d9e5 100644
--- a/lgsm/config-default/config-lgsm/opforserver/_default.cfg
+++ b/lgsm/config-default/config-lgsm/opforserver/_default.cfg
@@ -128,6 +128,15 @@ steammaster="true"
 # 10: Teamspeak 3
 stopmode="9"
 
+## Query mode
+# 1: session only
+# 2: gamedig + gsquery
+# 3: gamedig
+# 4: gsquery
+# 5: tcp
+querymode="2"
+querytype="protocol-valve"
+
 ## Game Server Details
 # Do not edit
 gamename="Half-Life: Opposing Force"
diff --git a/lgsm/config-default/config-lgsm/pcserver/_default.cfg b/lgsm/config-default/config-lgsm/pcserver/_default.cfg
index e6e63d677..f1d633e6a 100644
--- a/lgsm/config-default/config-lgsm/pcserver/_default.cfg
+++ b/lgsm/config-default/config-lgsm/pcserver/_default.cfg
@@ -120,6 +120,15 @@ steammaster="false"
 # 10: Teamspeak 3
 stopmode="2"
 
+## Query mode
+# 1: session only
+# 2: gamedig + gsquery
+# 3: gamedig
+# 4: gsquery
+# 5: tcp
+querymode="2"
+querytype="protocol-valve"
+
 ## Game Server Details
 # Do not edit
 gamename="Project Cars"
diff --git a/lgsm/config-default/config-lgsm/pstbsserver/_default.cfg b/lgsm/config-default/config-lgsm/pstbsserver/_default.cfg
index f9312a1cf..ddb0a5da8 100644
--- a/lgsm/config-default/config-lgsm/pstbsserver/_default.cfg
+++ b/lgsm/config-default/config-lgsm/pstbsserver/_default.cfg
@@ -129,6 +129,15 @@ steammaster="false"
 # 10: Teamspeak 3
 stopmode="2"
 
+## Query mode
+# 1: session only
+# 2: gamedig + gsquery
+# 3: gamedig
+# 4: gsquery
+# 5: tcp
+querymode="2"
+querytype="protocol-valve"
+
 ## Game Server Details
 # Do not edit
 gamename="pstbsserver"
diff --git a/lgsm/config-default/config-lgsm/pvkiiserver/_default.cfg b/lgsm/config-default/config-lgsm/pvkiiserver/_default.cfg
index 2e668ad5f..8d4e2105c 100644
--- a/lgsm/config-default/config-lgsm/pvkiiserver/_default.cfg
+++ b/lgsm/config-default/config-lgsm/pvkiiserver/_default.cfg
@@ -128,6 +128,15 @@ steammaster="true"
 # 10: Teamspeak 3
 stopmode="3"
 
+## Query mode
+# 1: session only
+# 2: gamedig + gsquery
+# 3: gamedig
+# 4: gsquery
+# 5: tcp
+querymode="2"
+querytype="protocol-valve"
+
 ## Game Server Details
 # Do not edit
 gamename="Pirates, Vikings, and Knights II"
diff --git a/lgsm/config-default/config-lgsm/pzserver/_default.cfg b/lgsm/config-default/config-lgsm/pzserver/_default.cfg
index bd0002893..756945cf2 100644
--- a/lgsm/config-default/config-lgsm/pzserver/_default.cfg
+++ b/lgsm/config-default/config-lgsm/pzserver/_default.cfg
@@ -123,6 +123,15 @@ steammaster="false"
 # 10: Teamspeak 3
 stopmode="3"
 
+## Query mode
+# 1: session only
+# 2: gamedig + gsquery
+# 3: gamedig
+# 4: gsquery
+# 5: tcp
+querymode="2"
+querytype="protocol-valve"
+
 ## Game Server Details
 # Do not edit
 gamename="Project Zomboid"
diff --git a/lgsm/config-default/config-lgsm/q2server/_default.cfg b/lgsm/config-default/config-lgsm/q2server/_default.cfg
index df37bc470..afe4e0f1e 100644
--- a/lgsm/config-default/config-lgsm/q2server/_default.cfg
+++ b/lgsm/config-default/config-lgsm/q2server/_default.cfg
@@ -114,6 +114,15 @@ sleeptime="0.5"
 # 10: Teamspeak 3
 stopmode="3"
 
+## Query mode
+# 1: session only
+# 2: gamedig + gsquery
+# 3: gamedig
+# 4: gsquery
+# 5: tcp
+querymode="2"
+querytype="protocol-quake2"
+
 ## Game Server Details
 # Do not edit
 gamename="Quake 2"
diff --git a/lgsm/config-default/config-lgsm/q3server/_default.cfg b/lgsm/config-default/config-lgsm/q3server/_default.cfg
index 5ba4134c0..68791bb60 100644
--- a/lgsm/config-default/config-lgsm/q3server/_default.cfg
+++ b/lgsm/config-default/config-lgsm/q3server/_default.cfg
@@ -114,6 +114,15 @@ sleeptime="0.5"
 # 10: Teamspeak 3
 stopmode="3"
 
+## Query mode
+# 1: session only
+# 2: gamedig + gsquery
+# 3: gamedig
+# 4: gsquery
+# 5: tcp
+querymode="2"
+querytype="protocol-quake3"
+
 ## Game Server Details
 # Do not edit
 gamename="Quake 3: Arena"
diff --git a/lgsm/config-default/config-lgsm/qlserver/_default.cfg b/lgsm/config-default/config-lgsm/qlserver/_default.cfg
index 3e3c30f80..5391c5976 100644
--- a/lgsm/config-default/config-lgsm/qlserver/_default.cfg
+++ b/lgsm/config-default/config-lgsm/qlserver/_default.cfg
@@ -122,6 +122,15 @@ steammaster="true"
 # 10: Teamspeak 3
 stopmode="3"
 
+## Query mode
+# 1: session only
+# 2: gamedig + gsquery
+# 3: gamedig
+# 4: gsquery
+# 5: tcp
+querymode="2"
+querytype="protocol-valve"
+
 ## Game Server Details
 # Do not edit
 gamename="Quake Live"
diff --git a/lgsm/config-default/config-lgsm/qwserver/_default.cfg b/lgsm/config-default/config-lgsm/qwserver/_default.cfg
index 236ad0bb4..6f2f41157 100644
--- a/lgsm/config-default/config-lgsm/qwserver/_default.cfg
+++ b/lgsm/config-default/config-lgsm/qwserver/_default.cfg
@@ -113,6 +113,15 @@ sleeptime="0.5"
 # 10: Teamspeak 3
 stopmode="3"
 
+## Query mode
+# 1: session only
+# 2: gamedig + gsquery
+# 3: gamedig
+# 4: gsquery
+# 5: tcp
+querymode="2"
+querytype="protocol-quake1"
+
 ## Game Server Details
 # Do not edit
 gamename="QuakeWorld"
diff --git a/lgsm/config-default/config-lgsm/ricochetserver/_default.cfg b/lgsm/config-default/config-lgsm/ricochetserver/_default.cfg
index 0d6ef56cc..6a688c835 100644
--- a/lgsm/config-default/config-lgsm/ricochetserver/_default.cfg
+++ b/lgsm/config-default/config-lgsm/ricochetserver/_default.cfg
@@ -128,6 +128,15 @@ steammaster="true"
 # 10: Teamspeak 3
 stopmode="9"
 
+## Query mode
+# 1: session only
+# 2: gamedig + gsquery
+# 3: gamedig
+# 4: gsquery
+# 5: tcp
+querymode="2"
+querytype="protocol-valve"
+
 ## Game Server Details
 # Do not edit
 gamename="Ricochet"
diff --git a/lgsm/config-default/config-lgsm/roserver/_default.cfg b/lgsm/config-default/config-lgsm/roserver/_default.cfg
index a13d199f5..7a65a0d67 100644
--- a/lgsm/config-default/config-lgsm/roserver/_default.cfg
+++ b/lgsm/config-default/config-lgsm/roserver/_default.cfg
@@ -128,6 +128,15 @@ steammaster="false"
 # 10: Teamspeak 3
 stopmode="2"
 
+## Query mode
+# 1: session only
+# 2: gamedig + gsquery
+# 3: gamedig
+# 4: gsquery
+# 5: tcp
+querymode="2"
+querytype="protocol-unreal2"
+
 ## Game Server Details
 # Do not edit
 gamename="Red Orchestra: Ostfront 41-45"
diff --git a/lgsm/config-default/config-lgsm/rtcwserver/_default.cfg b/lgsm/config-default/config-lgsm/rtcwserver/_default.cfg
index 8ded966d0..32ce55ab1 100644
--- a/lgsm/config-default/config-lgsm/rtcwserver/_default.cfg
+++ b/lgsm/config-default/config-lgsm/rtcwserver/_default.cfg
@@ -114,6 +114,15 @@ sleeptime="0.5"
 # 10: Teamspeak 3
 stopmode="3"
 
+## Query mode
+# 1: session only
+# 2: gamedig + gsquery
+# 3: gamedig
+# 4: gsquery
+# 5: tcp
+querymode="2"
+querytype="protocol-quake3"
+
 ## Game Server Details
 # Do not edit
 gamename="Return to Castle Wolfenstein"
diff --git a/lgsm/config-default/config-lgsm/rustserver/_default.cfg b/lgsm/config-default/config-lgsm/rustserver/_default.cfg
index 9f4448c29..dff675e15 100644
--- a/lgsm/config-default/config-lgsm/rustserver/_default.cfg
+++ b/lgsm/config-default/config-lgsm/rustserver/_default.cfg
@@ -121,7 +121,7 @@ logdays="7"
 
 ## Monitor | https://docs.linuxgsm.com/commands/monitor
 # Query delay time
-querydelay="1"
+querydelay="5"
 
 ## ANSI Colors | https://docs.linuxgsm.com/features/ansi-colors
 ansi="on"
@@ -152,6 +152,15 @@ steammaster="false"
 # 10: Teamspeak 3
 stopmode="2"
 
+## Query mode
+# 1: session only
+# 2: gamedig + gsquery
+# 3: gamedig
+# 4: gsquery
+# 5: tcp
+querymode="2"
+querytype="protocol-valve"
+
 ## Game Server Details
 # Do not edit
 gamename="Rust"
diff --git a/lgsm/config-default/config-lgsm/rwserver/_default.cfg b/lgsm/config-default/config-lgsm/rwserver/_default.cfg
index 0e35395d0..c4eec91d9 100644
--- a/lgsm/config-default/config-lgsm/rwserver/_default.cfg
+++ b/lgsm/config-default/config-lgsm/rwserver/_default.cfg
@@ -123,6 +123,15 @@ steammaster="false"
 # 10: Teamspeak 3
 stopmode="3"
 
+## Query mode
+# 1: session only
+# 2: gamedig + gsquery
+# 3: gamedig
+# 4: gsquery
+# 5: tcp
+querymode="1"
+querytype=""
+
 ## Game Server Details
 # Do not edit
 gamename="Rising World"
diff --git a/lgsm/config-default/config-lgsm/sampserver/_default.cfg b/lgsm/config-default/config-lgsm/sampserver/_default.cfg
index 1a56bf6ab..c8f90817c 100644
--- a/lgsm/config-default/config-lgsm/sampserver/_default.cfg
+++ b/lgsm/config-default/config-lgsm/sampserver/_default.cfg
@@ -113,6 +113,15 @@ sleeptime="0.5"
 # 10: Teamspeak 3
 stopmode="2"
 
+## Query mode
+# 1: session only
+# 2: gamedig + gsquery
+# 3: gamedig
+# 4: gsquery
+# 5: tcp
+querymode="3"
+querytype="samp"
+
 ## Game Server Details
 # Do not edit
 gamename="San Andreas Multiplayer"
@@ -127,6 +136,7 @@ systemdir="${serverfiles}"
 executabledir="${systemdir}/samp03"
 executable="./samp03svr"
 servercfg="server.cfg"
+servercfgdefault="server.cfg"
 servercfgdir="${systemdir}/samp03"
 servercfgfullpath="${servercfgdir}/${servercfg}"
 
diff --git a/lgsm/config-default/config-lgsm/sbotsserver/_default.cfg b/lgsm/config-default/config-lgsm/sbotsserver/_default.cfg
index 94acb175d..b71f3aae7 100644
--- a/lgsm/config-default/config-lgsm/sbotsserver/_default.cfg
+++ b/lgsm/config-default/config-lgsm/sbotsserver/_default.cfg
@@ -125,6 +125,15 @@ steammaster="false"
 # 10: Teamspeak 3
 stopmode="2"
 
+## Query mode
+# 1: session only
+# 2: gamedig + gsquery
+# 3: gamedig
+# 4: gsquery
+# 5: tcp
+querymode="2"
+querytype="protocol-valve"
+
 ## Game Server Details
 # Do not edit
 gamename="StickyBots"
diff --git a/lgsm/config-default/config-lgsm/sbserver/_default.cfg b/lgsm/config-default/config-lgsm/sbserver/_default.cfg
index 61598be97..46a671ae6 100644
--- a/lgsm/config-default/config-lgsm/sbserver/_default.cfg
+++ b/lgsm/config-default/config-lgsm/sbserver/_default.cfg
@@ -126,6 +126,15 @@ steammaster="flase"
 # 10: Teamspeak 3
 stopmode="2"
 
+## Query mode
+# 1: session only
+# 2: gamedig + gsquery
+# 3: gamedig
+# 4: gsquery
+# 5: tcp
+querymode="2"
+querytype="protocol-valve"
+
 ## Game Server Details
 # Do not edit
 gamename="Starbound"
diff --git a/lgsm/config-default/config-lgsm/sdtdserver/_default.cfg b/lgsm/config-default/config-lgsm/sdtdserver/_default.cfg
index 00eaf0fe4..edc437b70 100644
--- a/lgsm/config-default/config-lgsm/sdtdserver/_default.cfg
+++ b/lgsm/config-default/config-lgsm/sdtdserver/_default.cfg
@@ -123,6 +123,15 @@ steammaster="true"
 # 10: Teamspeak 3
 stopmode="8"
 
+## Query mode
+# 1: session only
+# 2: gamedig + gsquery
+# 3: gamedig
+# 4: gsquery
+# 5: tcp
+querymode="2"
+querytype="protocol-valve"
+
 ## Game Server Details
 # Do not edit
 gamename="7 Days To Die"
diff --git a/lgsm/config-default/config-lgsm/sfcserver/_default.cfg b/lgsm/config-default/config-lgsm/sfcserver/_default.cfg
index 798a23858..7f9b14dac 100644
--- a/lgsm/config-default/config-lgsm/sfcserver/_default.cfg
+++ b/lgsm/config-default/config-lgsm/sfcserver/_default.cfg
@@ -128,6 +128,15 @@ steammaster="true"
 # 10: Teamspeak 3
 stopmode="3"
 
+## Query mode
+# 1: session only
+# 2: gamedig + gsquery
+# 3: gamedig
+# 4: gsquery
+# 5: tcp
+querymode="2"
+querytype="protocol-valve"
+
 ## Game Server Details
 # Do not edit
 gamename="SourceForts Classic"
diff --git a/lgsm/config-default/config-lgsm/sof2server/_default.cfg b/lgsm/config-default/config-lgsm/sof2server/_default.cfg
index 4fa965da1..5458032c4 100644
--- a/lgsm/config-default/config-lgsm/sof2server/_default.cfg
+++ b/lgsm/config-default/config-lgsm/sof2server/_default.cfg
@@ -114,6 +114,15 @@ sleeptime="0.5"
 # 10: Teamspeak 3
 stopmode="3"
 
+## Query mode
+# 1: session only
+# 2: gamedig + gsquery
+# 3: gamedig
+# 4: gsquery
+# 5: tcp
+querymode="2"
+querytype="protocol-quake3"
+
 ## Game Server Details
 # Do not edit
 gamename="Soldier Of Fortune 2: Gold Edition"
diff --git a/lgsm/config-default/config-lgsm/solserver/_default.cfg b/lgsm/config-default/config-lgsm/solserver/_default.cfg
index beab68507..0090508b5 100644
--- a/lgsm/config-default/config-lgsm/solserver/_default.cfg
+++ b/lgsm/config-default/config-lgsm/solserver/_default.cfg
@@ -115,6 +115,15 @@ sleeptime="0.5"
 # 10: Teamspeak 3
 stopmode="2"
 
+## Query mode
+# 1: session only
+# 2: gamedig + gsquery
+# 3: gamedig
+# 4: gsquery
+# 5: tcp
+querymode="5"
+querytype=""
+
 ## Game Server Details
 # Do not edit
 gamename="Soldat"
diff --git a/lgsm/config-default/config-lgsm/squadserver/_default.cfg b/lgsm/config-default/config-lgsm/squadserver/_default.cfg
index 6c58cee6c..2a37e0ead 100644
--- a/lgsm/config-default/config-lgsm/squadserver/_default.cfg
+++ b/lgsm/config-default/config-lgsm/squadserver/_default.cfg
@@ -125,6 +125,15 @@ steammaster="false"
 # 10: Teamspeak 3
 stopmode="2"
 
+## Query mode
+# 1: session only
+# 2: gamedig + gsquery
+# 3: gamedig
+# 4: gsquery
+# 5: tcp
+querymode="2"
+querytype="protocol-valve"
+
 ## Game Server Details
 # Do not edit
 gamename="Squad"
diff --git a/lgsm/config-default/config-lgsm/ss3server/_default.cfg b/lgsm/config-default/config-lgsm/ss3server/_default.cfg
index f0bb3a55c..ebede1b84 100644
--- a/lgsm/config-default/config-lgsm/ss3server/_default.cfg
+++ b/lgsm/config-default/config-lgsm/ss3server/_default.cfg
@@ -124,6 +124,15 @@ steammaster="false"
 # 10: Teamspeak 3
 stopmode="2"
 
+## Query mode
+# 1: session only
+# 2: gamedig + gsquery
+# 3: gamedig
+# 4: gsquery
+# 5: tcp
+querymode="2"
+querytype="protocol-valve"
+
 ## Game Server Details
 # Do not edit
 gamename="Serious Sam 3: BFE"
diff --git a/lgsm/config-default/config-lgsm/stserver/_default.cfg b/lgsm/config-default/config-lgsm/stserver/_default.cfg
index 4c990b3b2..b5a3e5af0 100644
--- a/lgsm/config-default/config-lgsm/stserver/_default.cfg
+++ b/lgsm/config-default/config-lgsm/stserver/_default.cfg
@@ -130,6 +130,15 @@ steammaster="false"
 # 10: Teamspeak 3
 stopmode="2"
 
+## Query mode
+# 1: session only
+# 2: gamedig + gsquery
+# 3: gamedig
+# 4: gsquery
+# 5: tcp
+querymode="2"
+querytype="protocol-valve"
+
 ## Game Server Details
 # Do not edit
 gamename="Stationeers"
diff --git a/lgsm/config-default/config-lgsm/svenserver/_default.cfg b/lgsm/config-default/config-lgsm/svenserver/_default.cfg
index 570af640f..b495c852a 100644
--- a/lgsm/config-default/config-lgsm/svenserver/_default.cfg
+++ b/lgsm/config-default/config-lgsm/svenserver/_default.cfg
@@ -127,6 +127,15 @@ steammaster="true"
 # 10: Teamspeak 3
 stopmode="9"
 
+## Query mode
+# 1: session only
+# 2: gamedig + gsquery
+# 3: gamedig
+# 4: gsquery
+# 5: tcp
+querymode="2"
+querytype="protocol-valve"
+
 ## Game Server Details
 # Do not edit
 gamename="Sven Co-op"
diff --git a/lgsm/config-default/config-lgsm/terrariaserver/_default.cfg b/lgsm/config-default/config-lgsm/terrariaserver/_default.cfg
index dccd03d65..3dbcaa100 100644
--- a/lgsm/config-default/config-lgsm/terrariaserver/_default.cfg
+++ b/lgsm/config-default/config-lgsm/terrariaserver/_default.cfg
@@ -127,6 +127,15 @@ steammaster="false"
 # 10: Teamspeak 3
 stopmode="7"
 
+## Query mode
+# 1: session only
+# 2: gamedig + gsquery
+# 3: gamedig
+# 4: gsquery
+# 5: tcp
+querymode="5"
+querytype=""
+
 ## Game Server Details
 # Do not edit
 gamename="Terraria"
diff --git a/lgsm/config-default/config-lgsm/tf2server/_default.cfg b/lgsm/config-default/config-lgsm/tf2server/_default.cfg
index a7ba38d99..29ce24de0 100644
--- a/lgsm/config-default/config-lgsm/tf2server/_default.cfg
+++ b/lgsm/config-default/config-lgsm/tf2server/_default.cfg
@@ -133,6 +133,15 @@ steammaster="true"
 # 10: Teamspeak 3
 stopmode="3"
 
+## Query mode
+# 1: session only
+# 2: gamedig + gsquery
+# 3: gamedig
+# 4: gsquery
+# 5: tcp
+querymode="2"
+querytype="protocol-valve"
+
 ## Game Server Details
 # Do not edit
 gamename="Team Fortress 2"
diff --git a/lgsm/config-default/config-lgsm/tfcserver/_default.cfg b/lgsm/config-default/config-lgsm/tfcserver/_default.cfg
index 0f8029e2c..ad7a9dfb1 100644
--- a/lgsm/config-default/config-lgsm/tfcserver/_default.cfg
+++ b/lgsm/config-default/config-lgsm/tfcserver/_default.cfg
@@ -128,6 +128,15 @@ steammaster="true"
 # 10: Teamspeak 3
 stopmode="9"
 
+## Query mode
+# 1: session only
+# 2: gamedig + gsquery
+# 3: gamedig
+# 4: gsquery
+# 5: tcp
+querymode="2"
+querytype="protocol-valve"
+
 ## Game Server Details
 # Do not edit
 gamename="Team Fortress Classic"
diff --git a/lgsm/config-default/config-lgsm/ts3server/_default.cfg b/lgsm/config-default/config-lgsm/ts3server/_default.cfg
index 57a421e22..a92414e54 100644
--- a/lgsm/config-default/config-lgsm/ts3server/_default.cfg
+++ b/lgsm/config-default/config-lgsm/ts3server/_default.cfg
@@ -115,6 +115,15 @@ sleeptime="0.5"
 # 10: Teamspeak 3
 stopmode="2"
 
+## Query mode
+# 1: session only
+# 2: gamedig + gsquery
+# 3: gamedig
+# 4: gsquery
+# 5: tcp
+querymode="5"
+querytype=""
+
 ## Game Server Details
 # Do not edit
 gamename="TeamSpeak 3"
diff --git a/lgsm/config-default/config-lgsm/tsserver/_default.cfg b/lgsm/config-default/config-lgsm/tsserver/_default.cfg
index 2ef118a13..d1b1cc813 100644
--- a/lgsm/config-default/config-lgsm/tsserver/_default.cfg
+++ b/lgsm/config-default/config-lgsm/tsserver/_default.cfg
@@ -128,6 +128,15 @@ steammaster="true"
 # 10: Teamspeak 3
 stopmode="9"
 
+## Query mode
+# 1: session only
+# 2: gamedig + gsquery
+# 3: gamedig
+# 4: gsquery
+# 5: tcp
+querymode="2"
+querytype="protocol-valve"
+
 ## Game Server Details
 # Do not edit
 gamename="The Specialists"
diff --git a/lgsm/config-default/config-lgsm/tuserver/_default.cfg b/lgsm/config-default/config-lgsm/tuserver/_default.cfg
index ac13bdf46..9536d9fe5 100644
--- a/lgsm/config-default/config-lgsm/tuserver/_default.cfg
+++ b/lgsm/config-default/config-lgsm/tuserver/_default.cfg
@@ -130,6 +130,15 @@ steammaster="false"
 # 10: Teamspeak 3
 stopmode="2"
 
+## Query mode
+# 1: session only
+# 2: gamedig + gsquery
+# 3: gamedig
+# 4: gsquery
+# 5: tcp
+querymode="2"
+querytype="protocol-valve"
+
 ## Game Server Details
 # Do not edit
 gamename="Tower Unite"
diff --git a/lgsm/config-default/config-lgsm/twserver/_default.cfg b/lgsm/config-default/config-lgsm/twserver/_default.cfg
index b0d082566..c5be7b248 100644
--- a/lgsm/config-default/config-lgsm/twserver/_default.cfg
+++ b/lgsm/config-default/config-lgsm/twserver/_default.cfg
@@ -127,6 +127,15 @@ steammaster="false"
 # 10: Teamspeak 3
 stopmode="2"
 
+## Query mode
+# 1: session only
+# 2: gamedig + gsquery
+# 3: gamedig
+# 4: gsquery
+# 5: tcp
+querymode="4"
+querytype="teeworlds"
+
 ## Game Server Details
 # Do not edit
 gamename="Teeworlds"
diff --git a/lgsm/config-default/config-lgsm/untserver/_default.cfg b/lgsm/config-default/config-lgsm/untserver/_default.cfg
index b4fc532de..7ab5da558 100644
--- a/lgsm/config-default/config-lgsm/untserver/_default.cfg
+++ b/lgsm/config-default/config-lgsm/untserver/_default.cfg
@@ -130,6 +130,15 @@ steammaster="false"
 # 10: Teamspeak 3
 stopmode="2"
 
+## Query mode
+# 1: session only
+# 2: gamedig + gsquery
+# 3: gamedig
+# 4: gsquery
+# 5: tcp
+querymode="2"
+querytype="protocol-valve"
+
 ## Game Server Details
 # Do not edit
 gamename="Unturned"
diff --git a/lgsm/config-default/config-lgsm/ut2k4server/_default.cfg b/lgsm/config-default/config-lgsm/ut2k4server/_default.cfg
index d288c985a..c8a84bf6a 100644
--- a/lgsm/config-default/config-lgsm/ut2k4server/_default.cfg
+++ b/lgsm/config-default/config-lgsm/ut2k4server/_default.cfg
@@ -113,6 +113,15 @@ sleeptime="0.5"
 # 10: Teamspeak 3
 stopmode="2"
 
+## Query mode
+# 1: session only
+# 2: gamedig + gsquery
+# 3: gamedig
+# 4: gsquery
+# 5: tcp
+querymode="2"
+querytype="protocol-unreal2"
+
 ## Game Server Details
 # Do not edit
 gamename="Unreal Tournament 2004"
diff --git a/lgsm/config-default/config-lgsm/ut3server/_default.cfg b/lgsm/config-default/config-lgsm/ut3server/_default.cfg
index 831e41699..59e714649 100644
--- a/lgsm/config-default/config-lgsm/ut3server/_default.cfg
+++ b/lgsm/config-default/config-lgsm/ut3server/_default.cfg
@@ -124,6 +124,15 @@ sleeptime="0.5"
 # 10: Teamspeak 3
 stopmode="2"
 
+## Query mode
+# 1: session only
+# 2: gamedig + gsquery
+# 3: gamedig
+# 4: gsquery
+# 5: tcp
+querymode="1"
+querytype=""
+
 ## Game Server Details
 # Do not edit
 gamename="Unreal Tournament 3"
diff --git a/lgsm/config-default/config-lgsm/ut99server/_default.cfg b/lgsm/config-default/config-lgsm/ut99server/_default.cfg
index be962bd5f..69e6348ae 100644
--- a/lgsm/config-default/config-lgsm/ut99server/_default.cfg
+++ b/lgsm/config-default/config-lgsm/ut99server/_default.cfg
@@ -113,6 +113,15 @@ sleeptime="0.5"
 # 10: Teamspeak 3
 stopmode="2"
 
+## Query mode
+# 1: session only
+# 2: gamedig + gsquery
+# 3: gamedig
+# 4: gsquery
+# 5: tcp
+querymode="2"
+querytype="protocol-unreal2"
+
 ## Game Server Details
 # Do not edit
 gamename="Unreal Tournament 99"
diff --git a/lgsm/config-default/config-lgsm/utserver/_default.cfg b/lgsm/config-default/config-lgsm/utserver/_default.cfg
index 93da95e79..76e95307a 100644
--- a/lgsm/config-default/config-lgsm/utserver/_default.cfg
+++ b/lgsm/config-default/config-lgsm/utserver/_default.cfg
@@ -117,6 +117,15 @@ sleeptime="0.5"
 # 10: Teamspeak 3
 stopmode="2"
 
+## Query mode
+# 1: session only
+# 2: gamedig + gsquery
+# 3: gamedig
+# 4: gsquery
+# 5: tcp
+querymode="1"
+querytype=""
+
 ## Game Server Details
 # Do not edit
 gamename="Unreal Tournament"
diff --git a/lgsm/config-default/config-lgsm/vsserver/_default.cfg b/lgsm/config-default/config-lgsm/vsserver/_default.cfg
index 5c8d7be3f..aff533e96 100644
--- a/lgsm/config-default/config-lgsm/vsserver/_default.cfg
+++ b/lgsm/config-default/config-lgsm/vsserver/_default.cfg
@@ -128,6 +128,15 @@ steammaster="true"
 # 10: Teamspeak 3
 stopmode="9"
 
+## Query mode
+# 1: session only
+# 2: gamedig + gsquery
+# 3: gamedig
+# 4: gsquery
+# 5: tcp
+querymode="2"
+querytype="protocol-valve"
+
 ## Game Server Details
 # Do not edit
 gamename="Vampire Slayer"
diff --git a/lgsm/config-default/config-lgsm/wetserver/_default.cfg b/lgsm/config-default/config-lgsm/wetserver/_default.cfg
index 1be0a0eeb..15fb9c33a 100644
--- a/lgsm/config-default/config-lgsm/wetserver/_default.cfg
+++ b/lgsm/config-default/config-lgsm/wetserver/_default.cfg
@@ -109,6 +109,15 @@ sleeptime="0.5"
 # 10: Teamspeak 3
 stopmode="3"
 
+## Query mode
+# 1: session only
+# 2: gamedig + gsquery
+# 3: gamedig
+# 4: gsquery
+# 5: tcp
+querymode="2"
+querytype="protocol-quake3"
+
 ## Game Server Details
 # Do not edit
 gamename="Wolfenstein: Enemy Territory"
diff --git a/lgsm/config-default/config-lgsm/wfserver/_default.cfg b/lgsm/config-default/config-lgsm/wfserver/_default.cfg
index 76711d429..416df6bd1 100644
--- a/lgsm/config-default/config-lgsm/wfserver/_default.cfg
+++ b/lgsm/config-default/config-lgsm/wfserver/_default.cfg
@@ -114,6 +114,15 @@ sleeptime="0.5"
 # 10: Teamspeak 3
 stopmode="3"
 
+## Query mode
+# 1: session only
+# 2: gamedig + gsquery
+# 3: gamedig
+# 4: gsquery
+# 5: tcp
+querymode="2"
+querytype="protocol-quake3"
+
 ## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd
 # Server appid
 appid="1136510"
diff --git a/lgsm/config-default/config-lgsm/wurmserver/_default.cfg b/lgsm/config-default/config-lgsm/wurmserver/_default.cfg
index ccb18181b..504b551a3 100644
--- a/lgsm/config-default/config-lgsm/wurmserver/_default.cfg
+++ b/lgsm/config-default/config-lgsm/wurmserver/_default.cfg
@@ -119,6 +119,15 @@ steammaster="false"
 # 10: Teamspeak 3
 stopmode="2"
 
+## Query mode
+# 1: session only
+# 2: gamedig + gsquery
+# 3: gamedig
+# 4: gsquery
+# 5: tcp
+querymode="2"
+querytype="protocol-valve"
+
 ## Game Server Details
 # Do not edit
 gamename="Wurm Unlimited"
diff --git a/lgsm/config-default/config-lgsm/zmrserver/_default.cfg b/lgsm/config-default/config-lgsm/zmrserver/_default.cfg
index a5f1f83f0..b62905205 100644
--- a/lgsm/config-default/config-lgsm/zmrserver/_default.cfg
+++ b/lgsm/config-default/config-lgsm/zmrserver/_default.cfg
@@ -128,6 +128,15 @@ steammaster="true"
 # 10: Teamspeak 3
 stopmode="3"
 
+## Query mode
+# 1: session only
+# 2: gamedig + gsquery
+# 3: gamedig
+# 4: gsquery
+# 5: tcp
+querymode="2"
+querytype="protocol-valve"
+
 ## Game Server Details
 # Do not edit
 gamename="Zombie Master: Reborn"
diff --git a/lgsm/config-default/config-lgsm/zpsserver/_default.cfg b/lgsm/config-default/config-lgsm/zpsserver/_default.cfg
index 61991f3b8..0d216e319 100644
--- a/lgsm/config-default/config-lgsm/zpsserver/_default.cfg
+++ b/lgsm/config-default/config-lgsm/zpsserver/_default.cfg
@@ -133,6 +133,15 @@ steammaster="true"
 # 10: Teamspeak 3
 stopmode="3"
 
+## Query mode
+# 1: session only
+# 2: gamedig + gsquery
+# 3: gamedig
+# 4: gsquery
+# 5: tcp
+querymode="2"
+querytype="protocol-valve"
+
 ## Game Server Details
 # Do not edit
 gamename="Zombie Panic! Source"
diff --git a/lgsm/data/serverlist.csv b/lgsm/data/serverlist.csv
index 60c02feff..278294951 100644
--- a/lgsm/data/serverlist.csv
+++ b/lgsm/data/serverlist.csv
@@ -1,43 +1,43 @@
 ahl,ahlserver,Action half-life
 ahl2,ahl2server,Action: Source
-arma3,arma3server,ARMA 3
-sdtd,sdtdserver,7 Days to Die
 ark,arkserver,ARK: Survival Evolved
-bo,boserver,Ballistic Overkill
-bf1942,bf1942server,Battlefield 1942
+arma3,arma3server,ARMA 3
+bb,bbserver,BrainBread
+bb2,bb2server,BrainBread 2
 bd,bdserver,Base Defense
+bf1942,bf1942server,Battlefield 1942
 bmdm,bmdmserver,Black Mesa: Deathmatch
+bo,boserver,Ballistic Overkill
 bs,bsserver,Blade Symphony
-bb,bbserver,BrainBread
-bb2,bb2server,BrainBread 2
 bt,btserver,Barotrauma
 bt1944,bt1944server,Battalion 1944
+cc,ccserver,Codename CURE
 cod,codserver,Call of Duty
 cod2,cod2server,Call of Duty 2
 cod4,cod4server,Call of Duty 4
 coduo,coduoserver,Call of Duty: United Offensive
 codwaw,codwawserver,Call of Duty: World at War
-cc,ccserver,Codename CURE
 cs,csserver,Counter-Strike 1.6
 cscz,csczserver,Counter-Strike: Condition Zero
 csgo,csgoserver,Counter-Strike: Global Offensive
 css,cssserver,Counter-Strike: Source
+dab,dabserver,Double Action: Boogaloo
+dmc,dmcserver,Deathmatch Classic
 dod,dodserver,Day of Defeat
 dods,dodsserver,Day of Defeat: Source
 doi,doiserver,Day of Infamy
-dmc,dmcserver,Deathmatch Classic
 dst,dstserver,Don't Starve Together
-dab,dabserver,Double Action: Boogaloo
 dys,dysserver,Dystopia
 eco,ecoserver,Eco
 em,emserver,Empires Mod
+etl,etlserver,ET: Legacy
 fctr,fctrserver,Factorio
 fof,fofserver,Fistful of Frags
-gmod,gmodserver,Garrys Mod
 ges,gesserver,GoldenEye: Source
+gmod,gmodserver,Garrys Mod
 hl2dm,hl2dmserver,Half-Life 2: Deathmatch
-hldms,hldmsserver,Half-Life Deathmatch: Source
 hldm,hldmserver,Half-Life: Deathmatch
+hldms,hldmsserver,Half-Life Deathmatch: Source
 hw,hwserver,Hurtworld
 ins,insserver,Insurgency
 inss,inssserver,Insurgency: Sandstorm
@@ -59,44 +59,44 @@ ns,nsserver,Natural Selection
 ns2,ns2server,Natural Selection 2
 ns2c,ns2cserver,NS2: Combat
 opfor,opforserver,Opposing Force
+pc,pcserver,Project Cars
 pstbs,pstbsserver,Post Scriptum: The Bloody Seventh
 pvkii,pvkiiserver,Pirates Vikings & Knights II
-pc,pcserver,Project Cars
 pz,pzserver,Project Zomboid
 q2,q2server,Quake 2
 q3,q3server,Quake 3: Arena
 ql,qlserver,Quake Live
 qw,qwserver,Quake World
-ro,roserver,Red Orchestra: Ostfront 41-45
 ricochet,ricochetserver,Ricochet
+ro,roserver,Red Orchestra: Ostfront 41-45
 rtcw,rtcwserver,Return to Castle Wolfenstein
 rust,rustserver,Rust
-rw,rwserver, Rising World
+rw,rwserver,Rising World
 samp,sampserver,San Andreas Multiplayer
-sbots,sbotsserver, StickyBots
+sb,sbserver,Starbound
+sbots,sbotsserver,StickyBots
+sdtd,sdtdserver,7 Days to Die
 sfc,sfcserver,SourceForts Classic
 sof2,sof2server,Soldier Of Fortune 2: Gold Edition
 sol,solserver,Soldat
+squad,squadserver,Squad
 ss3,ss3server,Serious Sam 3: BFE
-sb,sbserver,Starbound
 st,stserver,Stationeers
-squad,squadserver,Squad
 sven,svenserver,Sven Co-op
+terraria,terrariaserver,Terraria
 tf2,tf2server,Team Fortress 2
 tfc,tfcserver,Team Fortress Classic
 ts,tsserver,The Specialists
 ts3,ts3server,Teamspeak 3
-tw,twserver,Teeworlds
-terraria,terrariaserver,Terraria
 tu,tuserver,Tower Unite
+tw,twserver,Teeworlds
+unt,untserver,Unturned
 ut2k4,ut2k4server,Unreal Tournament 2004
 ut3,ut3server,Unreal Tournament 3
 ut99,ut99server,Unreal Tournament 99
-unt,untserver,Unturned
 vs,vsserver,Vampire Slayer
 wet,wetserver,Wolfenstein: Enemy Territory
 wf,wfserver,Warfork
 wurm,wurmserver,Wurm Unlimited
-etl,etlserver,ET: Legacy
 zmr,zmrserver,Zombie Master: Reborn
 zps,zpsserver,Zombie Panic! Source
diff --git a/lgsm/functions/alert.sh b/lgsm/functions/alert.sh
index 510e47341..cb07a6fdd 100644
--- a/lgsm/functions/alert.sh
+++ b/lgsm/functions/alert.sh
@@ -98,7 +98,7 @@ fn_alert_log
 
 # Generates the more info link.
 if [ "${postalert}" == "on" ]&&[ -n "${postalert}" ]; then
-	alertflag=1
+	exitbypass=1
 	command_postdetails.sh
 elif [ "${postalert}" != "on" ]&&[ "${function_selfname}" == "command_test_alert.sh" ]; then
 	fn_print_warn_nl "More Info not enabled"
diff --git a/lgsm/functions/check_deps.sh b/lgsm/functions/check_deps.sh
index 4cabd78a9..e2e5d5139 100644
--- a/lgsm/functions/check_deps.sh
+++ b/lgsm/functions/check_deps.sh
@@ -389,7 +389,7 @@ fn_deps_build_debian(){
 	elif [ "${shortname}" == "hw" ]||[ "${shortname}" == "rust" ]; then
 		array_deps_required+=( lib32z1 )
 	# Minecraft
-	elif [ "${shortname}" == "mc" ]; then
+  elif [ "${shortname}" == "mc" ]||[ "${shortname}" == "rw" ]||[ "${shortname}" == "pz" ]; then
 		javaversion=$(java -version 2>&1 | grep "version")
 		if [ "${javaversion}" ]; then
 			# Added for users using Oracle JRE to bypass the check.
@@ -508,18 +508,8 @@ fn_deps_build_redhat(){
 		array_deps_required+=( xz )
 	elif [ "${shortname}" == "hw" ]||[ "${shortname}" == "rust" ]; then
 		array_deps_required+=( zlib-devel )
-	# Minecraft
-	elif [ "${shortname}" == "mc" ]; then
-		javaversion=$(java -version 2>&1 | grep "version")
-		if [ "${javaversion}" ]; then
-			# Added for users using Oracle JRE to bypass the check.
-			javacheck=1
-			array_deps_required+=( rng-tools )
-		else
-			array_deps_required+=( java-1.8.0-openjdk rng-tools )
-		fi
-	# Project Zomboid
-	elif [ "${shortname}" == "pz" ]; then
+	# Minecraft, Project Zomboid, Rising World
+  elif [ "${shortname}" == "mc" ]||[ "${shortname}" == "rw" ]||[ "${shortname}" == "pz" ]; then
 		javaversion=$(java -version 2>&1 | grep "version")
 		if [ "${javaversion}" ]; then
 			# Added for users using Oracle JRE to bypass the check.
diff --git a/lgsm/functions/check_ip.sh b/lgsm/functions/check_ip.sh
index b54dddd16..646a6899f 100644
--- a/lgsm/functions/check_ip.sh
+++ b/lgsm/functions/check_ip.sh
@@ -7,7 +7,7 @@
 
 local commandname="CHECK"
 
-if [ "${shortname}" != "ts3" ]&&[ "${shortname}" != "mumble" ]&&[ "${travistest}" != "1" ]; then
+if [ "${travistest}" != "1" ]; then
 	if [ ! -f "/bin/ip" ]; then
 		ipcommand="/sbin/ip"
 	else
diff --git a/lgsm/functions/command_backup.sh b/lgsm/functions/command_backup.sh
index 91f856809..749b024df 100644
--- a/lgsm/functions/command_backup.sh
+++ b/lgsm/functions/command_backup.sh
@@ -267,4 +267,5 @@ fn_backup_migrate_olddir
 fn_backup_compression
 fn_backup_prune
 fn_backup_start_server
+
 core_exit.sh
diff --git a/lgsm/functions/command_debug.sh b/lgsm/functions/command_debug.sh
index 5b3629844..74fe7f7b1 100644
--- a/lgsm/functions/command_debug.sh
+++ b/lgsm/functions/command_debug.sh
@@ -123,4 +123,5 @@ fn_print_dots "Stopping debug"
 fn_print_ok_nl "Stopping debug"
 # remove trap.
 trap - INT
+
 core_exit.sh
diff --git a/lgsm/functions/command_details.sh b/lgsm/functions/command_details.sh
index 6e4e8fecc..43fc463d8 100644
--- a/lgsm/functions/command_details.sh
+++ b/lgsm/functions/command_details.sh
@@ -30,4 +30,5 @@ fi
 fn_info_message_ports
 fn_info_message_select_engine
 fn_info_message_statusbottom
+
 core_exit.sh
diff --git a/lgsm/functions/command_dev_clear_functions.sh b/lgsm/functions/command_dev_clear_functions.sh
index 95f54e842..51878a381 100644
--- a/lgsm/functions/command_dev_clear_functions.sh
+++ b/lgsm/functions/command_dev_clear_functions.sh
@@ -12,4 +12,5 @@ if fn_prompt_yn "Do you want to delete all functions?" Y; then
 	rm -rfv "${functionsdir:?}/"*
 	rm -rfv "${configdirdefault:?}/"*
 fi
+
 core_exit.sh
diff --git a/lgsm/functions/command_dev_debug.sh b/lgsm/functions/command_dev_debug.sh
index 5229d068d..c8c57e995 100644
--- a/lgsm/functions/command_dev_debug.sh
+++ b/lgsm/functions/command_dev_debug.sh
@@ -17,4 +17,5 @@ else
 	fn_print_ok_nl "Enabled dev-debug"
 	fn_script_log_info "Enabled dev-debug"
 fi
+
 core_exit.sh
diff --git a/lgsm/functions/command_dev_detect_glibc.sh b/lgsm/functions/command_dev_detect_glibc.sh
index f8b858dff..e7b3b5e2d 100644
--- a/lgsm/functions/command_dev_detect_glibc.sh
+++ b/lgsm/functions/command_dev_detect_glibc.sh
@@ -88,4 +88,5 @@ if [ -f "${tmpdir}/detect_glibc_highest.tmp" ]; then
 else
 	fn_print_information_nl "glibc is not required"
 fi
+
 core_exit.sh
diff --git a/lgsm/functions/command_dev_query_raw.sh b/lgsm/functions/command_dev_query_raw.sh
index d927cd61a..483952015 100644
--- a/lgsm/functions/command_dev_query_raw.sh
+++ b/lgsm/functions/command_dev_query_raw.sh
@@ -7,13 +7,14 @@
 local commandname="QUERY-RAW"
 local commandaction="Query Raw"
 local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
+
 echo -e ""
-echo -e "Query Port"
+echo -e "Query Port - Raw Output"
 echo -e "=================================================================="
 echo -e ""
 echo -e "Gamedig Raw Output"
 echo -e "================================="
-echo""
+echo -e ""
 if [ ! "$(command -v gamedig 2>/dev/null)" ]; then
 	fn_print_failure_nl "gamedig not installed"
 fi
@@ -24,77 +25,54 @@ fi
 check.sh
 info_config.sh
 info_parms.sh
-if [ "${engine}" == "idtech3_ql" ]; then
-	local engine="quakelive"
-elif [ "${shortname}" == "kf2" ]; then
-	local engine="unreal4"
-fi
 
 query_gamedig.sh
 echo -e "${gamedigcmd}"
 echo""
 echo -e "${gamedigraw}" | jq
-echo""
+
+echo -e ""
 echo -e "gsquery Raw Output"
 echo -e "================================="
-echo""
-echo -e "./query_gsquery.py -a \"${ip}\" -p \"${queryport}\" -e \"${engine}\""
+echo -e ""
+echo -e "./query_gsquery.py -a \"${ip}\" -p \"${queryport}\" -e \"${querytype}\""
+echo -e ""
 if [ ! -f "${functionsdir}/query_gsquery.py" ]; then
 	fn_fetch_file_github "lgsm/functions" "query_gsquery.py" "${functionsdir}" "chmodx" "norun" "noforce" "nomd5"
 fi
-"${functionsdir}"/query_gsquery.py -a "${ip}" -p "${queryport}" -e "${engine}"
+"${functionsdir}"/query_gsquery.py -a "${ip}" -p "${queryport}" -e "${querytype}"
 
-echo""
+echo -e ""
 echo -e "TCP Raw Output"
 echo -e "================================="
-echo""
+echo -e ""
 echo -e "bash -c 'exec 3<> /dev/tcp/'${ip}'/'${queryport}''"
+echo -e ""
 bash -c 'exec 3<> /dev/tcp/'${ip}'/'${queryport}''
 querystatus="$?"
+echo -e ""
 if [ "${querystatus}" == "0" ]; then
 	echo -e "TCP query PASS"
 else
 	echo -e "TCP query FAIL"
 fi
 
-echo""
-echo -e "UDP Raw Output"
-echo -e "================================="
-echo""
-echo -e "bash -c 'exec 3<> /dev/udp/'${ip}'/'${queryport}''"
-bash -c 'exec 3<> /dev/udp/'${ip}'/'${queryport}''
-querystatus="$?"
-if [ "${querystatus}" == "0" ]; then
-	echo -e "UPD query PASS"
-else
-	echo -e "UPD query FAIL"
-fi
 echo -e ""
-echo -e "Game Port"
+echo -e "Game Port - Raw Output"
 echo -e "=================================================================="
 echo -e ""
-echo""
 echo -e "TCP Raw Output"
 echo -e "================================="
-echo""
+echo -e ""
 echo -e "bash -c 'exec 3<> /dev/tcp/'${ip}'/'${port}''"
+echo -e ""
 bash -c 'exec 3<> /dev/tcp/'${ip}'/'${port}''
 querystatus="$?"
+echo -e ""
 if [ "${querystatus}" == "0" ]; then
 	echo -e "TCP query PASS"
 else
 	echo -e "TCP query FAIL"
 fi
 
-echo""
-echo -e "UDP Raw Output"
-echo -e "================================="
-echo""
-echo -e "bash -c 'exec 3<> /dev/udp/'${ip}'/'${port}''"
-bash -c 'exec 3<> /dev/udp/'${ip}'/'${port}''
-querystatus="$?"
-if [ "${querystatus}" == "0" ]; then
-	echo -e "UDP query PASS"
-else
-	echo -e "UDP query FAIL"
-fi
+core_exit.sh
diff --git a/lgsm/functions/command_donate.sh b/lgsm/functions/command_donate.sh
index 036307051..54c46511d 100644
--- a/lgsm/functions/command_donate.sh
+++ b/lgsm/functions/command_donate.sh
@@ -2,7 +2,12 @@
 # LinuxGSM command_donate.sh function
 # Author: Daniel Gibbs
 # Website: https://linuxgsm.com
-# Description: Shows ways to donate
+# Description: Shows ways to donate.
+
+local commandname="CONSOLE"
+local commandaction="Console"
+local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
+
 fn_print_ascii_logo
 echo -e "${lightyellow}Support LinuxGSM${default}"
 echo -e "================================="
@@ -15,3 +20,5 @@ echo -e "* ${lightblue}PayPal:${default} https://linuxgsm.com/paypal"
 echo -e "* ${lightblue}Ko-Fi:${default} https://linuxgsm.com/ko-fi"
 echo -e ""
 echo -e "LinuxGSM est. 2012"
+
+core_exit.sh
diff --git a/lgsm/functions/command_fastdl.sh b/lgsm/functions/command_fastdl.sh
index b8b43785c..0eab220e2 100644
--- a/lgsm/functions/command_fastdl.sh
+++ b/lgsm/functions/command_fastdl.sh
@@ -438,4 +438,5 @@ echo -e "FastDL files are located in:"
 echo -e "${fastdldir}"
 echo -e "FastDL completed"
 fn_script_log_info "FastDL completed"
+
 core_exit.sh
diff --git a/lgsm/functions/command_install.sh b/lgsm/functions/command_install.sh
index 4be296cfe..b44ec60dc 100644
--- a/lgsm/functions/command_install.sh
+++ b/lgsm/functions/command_install.sh
@@ -47,5 +47,5 @@ else
 	fix.sh
 	install_stats.sh
 	install_complete.sh
-	core_exit.sh
 fi
+core_exit.sh
diff --git a/lgsm/functions/command_install_resources_mta.sh b/lgsm/functions/command_install_resources_mta.sh
index 0eaa378bd..9a3934de3 100644
--- a/lgsm/functions/command_install_resources_mta.sh
+++ b/lgsm/functions/command_install_resources_mta.sh
@@ -28,3 +28,5 @@ else
 	fn_print_warning_nl "Default resources are not installed when using ./${selfname} auto-install."
 	fn_print_information_nl "To install default resources use ./${selfname} install"
 fi
+
+core_exit.sh
diff --git a/lgsm/functions/command_monitor.sh b/lgsm/functions/command_monitor.sh
index 2e25177f7..cfb8e39a7 100644
--- a/lgsm/functions/command_monitor.sh
+++ b/lgsm/functions/command_monitor.sh
@@ -10,35 +10,122 @@ local commandname="MONITOR"
 local commandaction="Monitor"
 local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
 
-fn_monitor_loop(){
-# Monitor will query up to 5 times every 15 seconds.
-# Query will wait up to 60 seconds to confirm server is down giving server time if changing map.
+fn_monitor_check_lockfile(){
+	# Monitor does not run it lockfile is not found.
+	if [ ! -f "${rootdir}/${lockselfname}" ]; then
+		fn_print_dots "Checking lockfile: "
+		fn_print_checking_eol
+		fn_script_log_info "Checking lockfile: CHECKING"
+		fn_sleep_time
+		fn_print_error_nl "Checking lockfile: No lockfile found: "
+		fn_print_error_eol
+		fn_script_log_error "Checking lockfile: No lockfile found: ERROR"
+		fn_sleep_time
+		echo -e "	* Start ${selfname} to run monitor."
+		core_exit.sh
+	fi
+
+	# Fix if lockfile is not unix time or contains letters
+	if [[ "$(cat "${rootdir}/${lockselfname}")" =~ [A-Za-z] ]]; then
+			date '+%s' > "${rootdir}/${lockselfname}"
+	fi
+}
+
+fn_monitor_check_update(){
+	# Monitor will check if update is already running.
+	if [ "$(pgrep "${selfname} update" | wc -l)" != "0" ]; then
+		fn_print_dots "Checking active updates: "
+		fn_print_checking_eol
+		fn_script_log_info "Checking active updates: CHECKING"
+		fn_sleep_time
+		fn_print_error_nl "Checking active updates: SteamCMD is currently checking for updates: "
+		fn_print_error_eol
+		fn_script_log_error "Checking active updates: SteamCMD is currently checking for updates: ERROR"
+		fn_sleep_time
+		core_exit.sh
+	fi
+}
+
+fn_monitor_check_session(){
+	fn_print_dots "Checking session: "
+	fn_print_checking_eol
+	fn_script_log_info "Checking session: CHECKING"
+	fn_sleep_time
+	# uses status var from check_status.sh
+	if [ "${status}" != "0" ]; then
+		fn_print_ok "Checking session: "
+		fn_print_ok_eol_nl
+		fn_script_log_pass "Checking session: OK"
+		fn_sleep_time
+	else
+		fn_print_error "Checking session: "
+		fn_print_fail_eol_nl
+		fn_script_log_fatal "Checking session: FAIL"
+		fn_sleep_time
+		alert="restart"
+		alert.sh
+		fn_script_log_info "Checking session: Monitor is restarting ${selfname}"
+		command_restart.sh
+		core_exit.sh
+	fi
+}
+
+fn_monitor_check_queryport(){
+	# Monitor will check queryport is set before continuing.
+	if [ -z "${queryport}" ]||[ "${queryport}" == "0" ]; then
+		fn_print_dots "Checking port: "
+		fn_print_checking_eol
+		fn_script_log_info "Checking session: CHECKING"
+		fn_sleep_time
+		fn_print_error "Checking port: Unable to query as queryport is not set: "
+		fn_print_error_eol_nl
+		fn_script_log_error "Checking port: Unable to query as queryport is not set: ERROR"
+		fn_sleep_time
+		core_exit.sh
+	fi
+}
+
+fn_query_gsquery(){
+	if [ ! -f "${functionsdir}/query_gsquery.py" ]; then
+		fn_fetch_file_github "lgsm/functions" "query_gsquery.py" "${functionsdir}" "chmodx" "norun" "noforce" "nomd5"
+	fi
+	"${functionsdir}"/query_gsquery.py -a "${ip}" -p "${queryport}" -e "${querytype}" > /dev/null 2>&1
+	querystatus="$?"
+}
+
+fn_query_tcp(){
+	bash -c 'exec 3<> /dev/tcp/'${ip}'/'${queryport}'' > /dev/null 2>&1
+	querystatus="$?"
+}
+
+fn_monitor_query(){
+# Will loop and query up to 5 times every 15 seconds.
+# Query will wait up to 60 seconds to confirm server is down as server can become non-responsive during map changes.
 totalseconds=0
 for queryattempt in {1..5}; do
 	fn_print_dots "Querying port: ${querymethod}: ${ip}:${queryport} : ${totalseconds}/${queryattempt}: "
 	fn_print_querying_eol
 	fn_script_log_info "Querying port: ${querymethod}: ${ip}:${queryport} : ${queryattempt} : QUERYING"
+	fn_sleep_time
+	# querydelay
 	if [ "$(cat "${rootdir}/${lockselfname}")" -gt "$(date "+%s" -d "${querydelay} mins ago")" ]; then
 		fn_print_ok "Querying port: ${querymethod}: ${ip}:${queryport} : ${totalseconds}/${queryattempt}: "
-		fn_print_delay_eol
+		fn_print_delay_eol_nl
 		fn_script_log_info "Querying port: ${querymethod}: ${ip}:${queryport} : ${queryattempt} : DELAY"
-		fn_script_log_info "Query bypassed: ${gameservername} started less than ${querydelay} minute ago"
+		fn_script_log_info "Query bypassed: ${gameservername} started less than ${querydelay} minutes ago"
+		fn_sleep_time
 		monitorpass=1
 		core_exit.sh
+	# will use query method selected in fn_monitor_loop
+	# gamedig
 	elif [ "${querymethod}" ==  "gamedig" ]; then
 		query_gamedig.sh
+	# gsquery
 	elif [ "${querymethod}" ==  "gsquery" ]; then
-		if [ ! -f "${functionsdir}/query_gsquery.py" ]; then
-			fn_fetch_file_github "lgsm/functions" "query_gsquery.py" "${functionsdir}" "chmodx" "norun" "noforce" "nomd5"
-		fi
-		"${functionsdir}"/query_gsquery.py -a "${ip}" -p "${queryport}" -e "${engine}" > /dev/null 2>&1
-		querystatus="$?"
+		fn_query_gsquery
+	#tcp query
 	elif [ "${querymethod}" ==  "tcp" ]; then
-		bash -c 'exec 3<> /dev/tcp/'${ip}'/'${queryport}''
-		querystatus="$?"
-	elif [ "${querymethod}" ==  "udp" ]; then
-		bash -c 'exec 3<> /dev/udp/'${ip}'/'${queryport}''
-		querystatus="$?"
+		fn_query_tcp
 	fi
 
 	if [ "${querystatus}" == "0" ]; then
@@ -46,21 +133,43 @@ for queryattempt in {1..5}; do
 		fn_print_ok "Querying port: ${querymethod}: ${ip}:${queryport} : ${totalseconds}/${queryattempt}: "
 		fn_print_ok_eol_nl
 		fn_script_log_pass "Querying port: ${querymethod}: ${ip}:${queryport} : ${queryattempt}: OK"
+		fn_sleep_time
 		monitorpass=1
+		# send LinuxGSM stats if monitor is OK.
+		if [ "${stats}" == "on" ]; then
+			info_stats.sh
+		fi
+    if [ "${querystatus}" == "0" ]; then
+			# Add query data to log.
+			if [ -n "${gdname}" ]; then
+				fn_script_log_info "Server name: ${gdname}"
+			fi
+			if [ -n "${gdplayers}" ]; then
+				fn_script_log_info "Players: ${gdplayers}/${gdmaxplayers}"
+			fi
+			if [ -n "${gdmap}" ]; then
+				fn_script_log_info "Map: ${gdmap}"
+			fi
+			if [ -n "${gdgamemode}" ]; then
+				fn_script_log_info "Game Mode: ${gdgamemode}"
+			fi
+		fi
 		core_exit.sh
 	else
 		# Server query FAIL.
-		fn_script_log_info "Querying port: ${querymethod}: ${ip}:${queryport} : ${queryattempt}: FAIL"
 		fn_print_fail "Querying port: ${querymethod}: ${ip}:${queryport} : ${totalseconds}/${queryattempt}: "
 		fn_print_fail_eol
-		# Monitor try gamedig first then gsquery before restarting.
-		if [ "${querymethod}" ==  "gsquery" ]; then
+		fn_script_log_warn "Querying port: ${querymethod}: ${ip}:${queryport} : ${queryattempt}: FAIL"
+		fn_sleep_time
+		# Monitor will try gamedig (if supported) for first 30s then gsquery before restarting.
+		if [ "${querymethod}" ==  "gsquery" ]||[ "${querymethod}" ==  "tcp" ]; then
+			# gsquery will fail if longer than 60s
 			if [ "${totalseconds}" -ge "59" ]; then
-				# Server query FAIL for over 59 seconds reboot server.
+				# Monitor will FAIL if over 60s and trigger gane server reboot.
 				fn_print_fail "Querying port: ${querymethod}: ${ip}:${queryport} : ${totalseconds}/${queryattempt}: "
 				fn_print_fail_eol_nl
-				fn_script_log_error "Querying port: ${querymethod}: ${ip}:${queryport} : ${queryattempt}: FAIL"
-
+				fn_script_log_warn "Querying port: ${querymethod}: ${ip}:${queryport} : ${queryattempt}: FAIL"
+				fn_sleep_time
 				# Send alert if enabled.
 				alert="restartquery"
 				alert.sh
@@ -68,12 +177,13 @@ for queryattempt in {1..5}; do
 				core_exit.sh
 			fi
 		elif [ "${querymethod}" ==  "gamedig" ]; then
+			# gamedig will fail and try gsquery if longer than 30s
 			if [ "${totalseconds}" -ge "29" ]; then
 				break
 			fi
 		fi
 
-		# Seconds counter.
+		# Second counter will wait for 15s before breaking loop.
 		for seconds in {1..15}; do
 			fn_print_fail "Querying port: ${querymethod}: ${ip}:${queryport} : ${totalseconds}/${queryattempt}: WAIT"
 			totalseconds=$((totalseconds + 1))
@@ -85,139 +195,56 @@ for queryattempt in {1..5}; do
 done
 }
 
-fn_monitor_check_lockfile(){
-	# Monitor does not run it lockfile is not found.
-	if [ ! -f "${rootdir}/${lockselfname}" ]; then
-		fn_print_error_nl "Disabled: No lockfile found"
-		fn_script_log_error "Disabled: No lockfile found"
-		echo -e "	* To enable monitor run ./${selfname} start"
-		core_exit.sh
-	fi
-}
-
-fn_monitor_check_update(){
-	# Monitor will check if update is already running.
-	if [ "$(pgrep "${selfname} update" | wc -l)" != "0" ]; then
-		fn_print_error_nl "SteamCMD is currently checking for updates"
-		fn_script_log_error "SteamCMD is currently checking for updates"
-		core_exit.sh
-	fi
-}
-
-fn_monitor_check_session(){
-	fn_print_dots "Checking session: "
-	fn_print_checking_eol
-	fn_script_log_info "Checking session: CHECKING"
-	if [ "${status}" != "0" ]; then
-		fn_print_ok "Checking session: "
-		fn_print_ok_eol_nl
-		fn_script_log_pass "Checking session: OK"
-	else
-		if [ "${shortname}" == "ts3" ]; then
-			fn_print_error "Checking session: ${ts3error}: "
-		elif [ "${shortname}" == "mumble" ]; then
-			fn_print_error "Checking session: Not listening to port ${queryport}"
-		else
-			fn_print_error "Checking session: "
-		fi
-		fn_print_fail_eol_nl
-		fn_script_log_error "Checking session: FAIL"
-		alert="restart"
-		alert.sh
-		fn_script_log_info "Monitor is starting ${servername}"
-		command_restart.sh
-		core_exit.sh
+fn_monitor_loop(){
+	# loop though query methods selected by querymode.
+	totalseconds=0
+	if [ "${querymode}" == "2" ]; then
+		local query_methods_array=( gamedig gsquery )
+	elif [ "${querymode}" == "3" ]; then
+		local query_methods_array=( gamedig )
+	elif [ "${querymode}" == "4" ]; then
+			local query_methods_array=( gsquery )
+	elif [ "${querymode}" == "5" ]; then
+		local query_methods_array=( tcp )
 	fi
-}
-
-fn_monitor_query(){
-	fn_script_log_info "Querying port: query enabled"
-	# Engines that work with query.
-	local allowed_engines_array=( avalanche2.0 avalanche3.0 barotrauma goldsource idtech2 idtech3 idtech3_ql ioquake3 iw2.0 iw3.0 lwjgl2 madness quake qfusion refractor realvirtuality source spark starbound unity3d unreal unreal2 unreal4 wurm )
-	for allowed_engine in "${allowed_engines_array[@]}"
+	for querymethod in "${query_methods_array[@]}"
 	do
-		if [ "${allowed_engine}" == "${engine}" ]; then
-			if [ "${engine}" == "idtech3_ql" ]; then
-				local engine="quakelive"
-			elif [ "${shortname}" == "kf2" ]; then
-				local engine="unreal4"
-			fi
-
-			# Will first attempt to use gamedig then gsquery.
-			totalseconds=0
-			if [ "${shortname}" == "wurm" ]; then
-				local query_methods_array=( gsquery )
+		# Will check if gamedig is installed and bypass if not.
+		if [ "${querymethod}" == "gamedig" ]; then
+			if [ "$(command -v gamedig 2>/dev/null)" ]&&[ "$(command -v jq 2>/dev/null)" ]; then
+				if [ -z "${monitorpass}" ]; then
+					fn_monitor_query
+				fi
 			else
-				local query_methods_array=( gamedig gsquery )
+				fn_script_log_info "gamedig is not installed"
+				fn_script_log_info "https://docs.linuxgsm.com/requirements/gamedig"
+			fi
+		else
+			# will not query if query already passed.
+			if [ -z "${monitorpass}" ]; then
+				fn_monitor_query
 			fi
-			for query_method in "${query_methods_array[@]}"
-			do
-				if [ "${query_method}" == "gamedig" ]; then
-					# Will bypass gamedig if not installed.
-					if [ "$(command -v gamedig 2>/dev/null)" ]&&[ "$(command -v jq 2>/dev/null)" ]; then
-						if [ -z "${monitorpass}" ]; then
-							querymethod="${query_method}"
-							fn_monitor_loop
-						fi
-					fi
-				else
-					if [ -z "${monitorpass}" ]; then
-						querymethod="${query_method}"
-						fn_monitor_loop
-					fi
-				fi
-			done
 		fi
 	done
 }
 
-fn_monitor_query_tcp(){
-	querymethod="tcp"
-	fn_monitor_loop
-}
-
-fn_monitor_query_udp(){
-	querymethod="upd"
-	fn_monitor_loop
-}
-
 monitorflag=1
-fn_print_dots "${servername}"
 check.sh
 logs.sh
 info_config.sh
 info_parms.sh
 
-if [ "${stats}" == "on" ]; then
-	info_stats.sh
-fi
-
+# query pre-checks
 fn_monitor_check_lockfile
 fn_monitor_check_update
 fn_monitor_check_session
+fn_monitor_check_queryport
 
-# Fix if lockfile is not unix time or contains letters
-if [[ "$(cat "${rootdir}/${lockselfname}")" =~ [A-Za-z] ]]; then
-    date '+%s' > "${rootdir}/${lockselfname}"
-fi
-
-# Add a query bypass if missing
+# Add a querydelay of 1 min if var missing.
 if [ -z "${querydelay}" ]; then
 	querydelay="1"
 fi
 
-# Query has to be enabled in Starbound config.
-if [ "${shortname}" == "sb" ]; then
-	if [ "${queryenabled}" == "true" ]; then
-		fn_monitor_query
-	fi
-elif [ "${shortname}" == "ts3" ]||[ "${shortname}" == "eco" ]||[ "${shortname}" == "mumble" ]; then
-	fn_monitor_query_tcp
-elif [ "${shortname}" == "mohaa" ]; then
-	# prevent game from using query. Only used if specific game server cant query but engine can
-	:
-else
-	fn_monitor_query
-fi
+fn_monitor_loop
 
 core_exit.sh
diff --git a/lgsm/functions/command_postdetails.sh b/lgsm/functions/command_postdetails.sh
index 4bede0eb2..02e57fed0 100644
--- a/lgsm/functions/command_postdetails.sh
+++ b/lgsm/functions/command_postdetails.sh
@@ -48,7 +48,7 @@ if [ -f "${postdetailslog}" ]; then
 fi
 
 # Rather than a one-pass sed parser, default to using a temporary directory.
-if [ -n "${alertflag}" ]; then
+if [ -n "${exitbypass}" ]; then
 	postdetailslog="${alertlog}"
 else
 	# Run checks and gathers details to display.
@@ -117,7 +117,7 @@ else
 	 core_exit.sh
 fi
 
-if [ -z "${alertflag}" ]; then
+if [ -z "${exitbypass}" ]; then
 	core_exit.sh
 else
 	alerturl="${pdurl}"
diff --git a/lgsm/functions/command_restart.sh b/lgsm/functions/command_restart.sh
index 2ece0810c..080b3d8e7 100644
--- a/lgsm/functions/command_restart.sh
+++ b/lgsm/functions/command_restart.sh
@@ -12,3 +12,5 @@ info_config.sh
 exitbypass=1
 command_stop.sh
 command_start.sh
+
+core_exit.sh
diff --git a/lgsm/functions/command_start.sh b/lgsm/functions/command_start.sh
index 7fc8a2987..93385351d 100644
--- a/lgsm/functions/command_start.sh
+++ b/lgsm/functions/command_start.sh
@@ -163,8 +163,10 @@ fn_sleep_time
 	echo -en "\n"
 }
 
-fn_print_dots "${servername}"
+
 check.sh
+
+fn_print_dots "${servername}"
 # Is the server already started.
 # $status comes from check_status.sh, which is run by check.sh for this command
 if [ "${status}" != "0" ]; then
@@ -192,4 +194,5 @@ if [ "${shortname}" == "ts3" ]; then
 else
 	fn_start_tmux
 fi
+
 core_exit.sh
diff --git a/lgsm/functions/command_stop.sh b/lgsm/functions/command_stop.sh
index 869e19761..c45ed6b4c 100644
--- a/lgsm/functions/command_stop.sh
+++ b/lgsm/functions/command_stop.sh
@@ -235,14 +235,16 @@ fn_stop_pre_check(){
 	fi
 }
 
-fn_print_dots "${servername}"
 check.sh
+fn_print_dots "${servername}"
+
 info_config.sh
 fn_stop_pre_check
 # Remove lockfile.
 if [ -f "${rootdir}/${lockselfname}" ]; then
 	rm -f "${rootdir}/${lockselfname}"
 fi
+
 if [ -z "${exitbypass}" ]; then
 	core_exit.sh
 fi
diff --git a/lgsm/functions/command_test_alert.sh b/lgsm/functions/command_test_alert.sh
index 014e082b2..82882f9ee 100644
--- a/lgsm/functions/command_test_alert.sh
+++ b/lgsm/functions/command_test_alert.sh
@@ -13,4 +13,5 @@ check.sh
 info_config.sh
 alert="test"
 alert.sh
+
 core_exit.sh
diff --git a/lgsm/functions/command_ts3_server_pass.sh b/lgsm/functions/command_ts3_server_pass.sh
index fc242c16e..eee38832a 100644
--- a/lgsm/functions/command_ts3_server_pass.sh
+++ b/lgsm/functions/command_ts3_server_pass.sh
@@ -47,4 +47,5 @@ else
 	fn_serveradmin_password_set
 	command_stop.sh
 fi
+
 core_exit.sh
diff --git a/lgsm/functions/command_update_linuxgsm.sh b/lgsm/functions/command_update_linuxgsm.sh
index 4a70c7748..95d6e8052 100644
--- a/lgsm/functions/command_update_linuxgsm.sh
+++ b/lgsm/functions/command_update_linuxgsm.sh
@@ -112,5 +112,5 @@ else
 	fn_print_ok "Updating functions"
 	fn_script_log_pass "Updating functions"
 fi
-echo -en "\n"
+
 core_exit.sh
diff --git a/lgsm/functions/command_validate.sh b/lgsm/functions/command_validate.sh
index 78210ff4b..02ba07271 100644
--- a/lgsm/functions/command_validate.sh
+++ b/lgsm/functions/command_validate.sh
@@ -51,4 +51,5 @@ if [ "${status}" != "0" ]; then
 else
 	fn_validation
 fi
+
 core_exit.sh
diff --git a/lgsm/functions/compress_unreal2_maps.sh b/lgsm/functions/compress_unreal2_maps.sh
index 3208212f2..3af14d47d 100644
--- a/lgsm/functions/compress_unreal2_maps.sh
+++ b/lgsm/functions/compress_unreal2_maps.sh
@@ -27,4 +27,5 @@ for map in "${serverfiles}/Maps/"*; do
 	./ucc-bin compress "${map}" --nohomedir
 done
 mv -fv "${serverfiles}/Maps/"*.ut2.uz2 "${compressedmapsdir}"
+
 core_exit.sh
diff --git a/lgsm/functions/compress_ut99_maps.sh b/lgsm/functions/compress_ut99_maps.sh
index d52ae01d0..8e2a18f35 100644
--- a/lgsm/functions/compress_ut99_maps.sh
+++ b/lgsm/functions/compress_ut99_maps.sh
@@ -27,4 +27,5 @@ for map in "${serverfiles}/Maps/"*; do
 	./ucc-bin compress "${map}" --nohomedir
 done
 mv -fv "${serverfiles}/Maps/"*.unr.uz "${compressedmapsdir}"
+
 core_exit.sh
diff --git a/lgsm/functions/core_messages.sh b/lgsm/functions/core_messages.sh
index e1d394834..6a8ed296a 100644
--- a/lgsm/functions/core_messages.sh
+++ b/lgsm/functions/core_messages.sh
@@ -351,6 +351,10 @@ fn_print_error_eol(){
 	echo -en "${red}ERROR${default}"
 }
 
+fn_print_error_eol_nl(){
+	echo -en "${red}ERROR${default}"
+}
+
 # WARN
 fn_print_warn_eol(){
 	echo -en "${lightyellow}WARN${default}"
diff --git a/lgsm/functions/info_config.sh b/lgsm/functions/info_config.sh
index 9c12907f8..fce013a28 100644
--- a/lgsm/functions/info_config.sh
+++ b/lgsm/functions/info_config.sh
@@ -832,12 +832,14 @@ fn_info_config_teeworlds(){
 		serverpassword="${unavailable}"
 		rconpassword="${unavailable}"
 		port="8303"
+		queryport="8303"
 		maxplayers="12"
 	else
 		servername=$(grep "sv_name" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/^sv_name//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//')
 		serverpassword=$(grep "password" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' | grep "^password" | sed -e '/^#/d' -e 's/^password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//')
 		rconpassword=$(grep "sv_rcon_password" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/^sv_rcon_password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//')
 		port=$(grep "sv_port" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]')
+		queryport="${port}"
 		maxplayers=$(grep "sv_max_clients" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]')
 
 		# Not Set
@@ -845,6 +847,7 @@ fn_info_config_teeworlds(){
 		serverpassword=${serverpassword:-"NOT SET"}
 		rconpassword=${rconpassword:-"NOT SET"}
 		port=${port:-"8303"}
+		queryport=${port:-"8303"}
 		maxplayers=${maxplayers:-"12"}
 	fi
 }
@@ -855,15 +858,18 @@ fn_info_config_terraria(){
 		port="${zero}"
 		gameworld="${unavailable}"
 		maxplayers="${zero}"
+		queryport="${zero}"
 	else
 		servername=$(grep "worldname" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/worldname//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//')
 		port=$(grep "port" "${servercfgfullpath}" | tr -cd '[:digit:]')
+		queryport=${port:-"0"}
 		gameworld=$(grep "world=" "${servercfgfullpath}" | grep -v "//" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/world=//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//')
 		maxplayers=$(grep "maxplayers" "${servercfgfullpath}" | grep -v "//" | tr -cd '[:digit:]')
 
 		# Not Set
 		servername=${servername:-"NOT SET"}
 		port=${port:-"0"}
+		queryport=${queryport:-"0"}
 		gameworld=${gameworld:-"NOT SET"}
 		maxplayers=${maxplayers:-"0"}
 	fi
@@ -890,7 +896,7 @@ fn_info_config_unreal(){
 		adminpassword="${unavailable}"
 		port="${zero}"
 		queryport="${zero}"
-		gsqueryport="${zero}"
+		queryportgs="${zero}"
 		webadminenabled="${unavailable}"
 		webadminport="${zero}"
 		webadminuser="${unavailable}"
@@ -901,16 +907,48 @@ fn_info_config_unreal(){
 		adminpassword=$(grep "AdminPassword" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/AdminPassword//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//'| sed 's/\r$//')
 		port=$(grep "Port" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' | grep "^Port" | grep -v "#" | tr -cd '[:digit:]')
 		queryport=$((port + 1))
-		gsqueryport=$(grep "OldQueryPortNumber" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]')
+		queryportgs=$(grep "OldQueryPortNumber" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]')
 		webadminenabled=$(grep "bEnabled" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/bEnabled//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//'| sed 's/\r$//')
 		webadminport=$(grep "ListenPort" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]')
-		if [ "${engine}" == "unreal" ]; then
-			webadminuser=$(grep "AdminUsername" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/AdminUsername//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//'| sed 's/\r$//')
-			webadminpass=$(grep "UTServerAdmin.UTServerAdmin" "${servercfgfullpath}" -A 4 | grep "AdminPassword" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/AdminPassword//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//'| sed 's/\r$//')
-		else
-			webadminuser=$(grep "AdminName" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/AdminName//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//'| sed 's/\r$//')
-			webadminpass="${adminpassword}"
-		fi
+		webadminuser=$(grep "AdminUsername" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/AdminUsername//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//'| sed 's/\r$//')
+		webadminpass=$(grep "UTServerAdmin.UTServerAdmin" "${servercfgfullpath}" -A 4 | grep "AdminPassword" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/AdminPassword//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//'| sed 's/\r$//')
+		# Not Set
+		servername=${servername:-"NOT SET"}
+		serverpassword=${serverpassword:-"NOT SET"}
+		adminpassword=${adminpassword:-"NOT SET"}
+		port=${port:-"0"}
+		queryport=${queryport:-"0"}
+		queryportgs=${queryportgs:-"0"}
+		webadminenabled=${webadminenabled:-"NOT SET"}
+		webadminport=${webadminport:-"0"}
+		webadminuser=${webadminuser:-"NOT SET"}
+		webadminpass=${webadminpass:-"NOT SET"}
+	fi
+}
+
+fn_info_config_unreal2(){
+	if [ ! -f "${servercfgfullpath}" ]; then
+		servername="${unavailable}"
+		serverpassword="${unavailable}"
+		adminpassword="${unavailable}"
+		port="${zero}"
+		queryport="${zero}"
+		queryportgs="${zero}"
+		webadminenabled="${unavailable}"
+		webadminport="${zero}"
+		webadminuser="${unavailable}"
+		webadminpass="${unavailable}"
+	else
+		servername=$(grep "ServerName" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/ServerName//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//'| sed 's/\r$//')
+		serverpassword=$(grep "GamePassword" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/GamePassword//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//'| sed 's/\r$//')
+		adminpassword=$(grep "AdminPassword" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/AdminPassword//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//'| sed 's/\r$//')
+		port=$(grep "Port" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' | grep "^Port" | grep -v "#" | tr -cd '[:digit:]')
+		queryport=$((port + 1))
+		queryportgs=$(grep "OldQueryPortNumber" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]')
+		webadminenabled=$(grep "bEnabled" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/bEnabled//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//'| sed 's/\r$//')
+		webadminport=$(grep "ListenPort" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]')
+		webadminuser=$(grep "AdminName" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/AdminName//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//'| sed 's/\r$//')
+		webadminpass="${adminpassword}"
 
 		# Not Set
 		servername=${servername:-"NOT SET"}
@@ -918,7 +956,7 @@ fn_info_config_unreal(){
 		adminpassword=${adminpassword:-"NOT SET"}
 		port=${port:-"0"}
 		queryport=${queryport:-"0"}
-		gsqueryport=${gsqueryport:-"0"}
+		queryportgs=${queryportgs:-"0"}
 		webadminenabled=${webadminenabled:-"NOT SET"}
 		webadminport=${webadminport:-"0"}
 		webadminuser=${webadminuser:-"NOT SET"}
@@ -1067,20 +1105,18 @@ fn_info_config_mta(){
 	else
 		port=$(grep -m 1 "serverport" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/<serverport>//g' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//' | cut -f1 -d "<" | tr -cd '[:digit:]')
 		httpport=$(grep -m 1 "httpport" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/<httpport>//g' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//' | cut -f1 -d "<" | tr -cd '[:digit:]')
-		ase=$(grep -m 1 "ase" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/<ase>//g' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//' | cut -f1 -d "<" | tr -cd '[:digit:]')
 		servername=$(grep -m 1 "servername" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/<servername>//g' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//' | cut -f1 -d "<")
 		serverpassword=$(grep -m 1 "password" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/<password>//g' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//' | cut -f1 -d "<")
 		maxplayers=$(grep -m 1 "maxplayers" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/<maxplayers>//g' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//' | cut -f1 -d "<" | tr -cd '[:digit:]')
-
+		ase=$(grep -m 1 "ase" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/<ase>//g' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//' | cut -f1 -d "<" | tr -cd '[:digit:]')
 		if [ "${ase}" == "1" ]; then
 			ase="Enabled"
 		else
 			ase="Disabled"
 		fi
-
-		ip=$(grep -m 1 "serverip" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/<serverip>//g' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//' | cut -f1 -d "<")
-		ipsetinconfig=1
-		ipinconfigvar="serverip"
+		# ip=$(grep -m 1 "serverip" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/<serverip>//g' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//' | cut -f1 -d "<")
+		# ipsetinconfig=1
+		# ipinconfigvar="serverip"
 
 		# Not Set
 		port=${port:-"22003"}
@@ -1312,7 +1348,7 @@ elif [ "${shortname}" == "kf2" ]; then
 	fn_info_config_kf2
 # Medal of Honor: Allied Assault
 elif [ "${shortname}" == "mohaa" ]; then
-  fn_info_config_mohaa
+	fn_info_config_mohaa
 # QuakeWorld
 elif [ "${shortname}" == "qw" ]; then
 	fn_info_config_quakeworld
@@ -1342,7 +1378,7 @@ elif [ "${shortname}" == "arma3" ]; then
 	fn_info_config_realvirtuality
 # Return to Castle Wolfenstein
 elif [ "${shortname}" == "rtcw" ]; then
-  fn_info_config_rtcw
+	fn_info_config_rtcw
 # Rising World
 elif [ "${shortname}" == "rw" ]; then
 	fn_info_config_risingworld
@@ -1354,7 +1390,7 @@ elif [ "${shortname}" == "sol" ]; then
 	fn_info_config_soldat
 # Soldier Of Fortune 2: Gold Edition
 elif [ "${shortname}" == "sof2" ]; then
-  fn_info_config_sof2
+	fn_info_config_sof2
 # Source Engine Games
 elif [ "${engine}" == "source" ]||[ "${engine}" == "goldsource" ]; then
 	fn_info_config_source
@@ -1382,9 +1418,12 @@ elif [ "${shortname}" == "terraria" ]; then
 # Tower Unite
 elif [ "${shortname}" == "tu" ]; then
 	fn_info_config_towerunite
-# Unreal/Unreal 2 engine
-elif [ "${engine}" == "unreal" ]||[ "${engine}" == "unreal2" ]; then
+# Unreal engine
+elif [ "${engine}" == "unreal" ]; then
 	fn_info_config_unreal
+# Unreal 2 engine
+elif [ "${engine}" == "unreal2" ]; then
+  fn_info_config_unreal2
 # Unreal 3 engine
 elif [ "${engine}" == "unreal3" ]; then
 	fn_info_config_unreal3
diff --git a/lgsm/functions/info_messages.sh b/lgsm/functions/info_messages.sh
index bca3c5586..194529d27 100644
--- a/lgsm/functions/info_messages.sh
+++ b/lgsm/functions/info_messages.sh
@@ -25,9 +25,9 @@ fn_info_message_head(){
 	echo -e ""
 	echo -e "Server IP"
 	if [ "${multiple_ip}" == "1" ]; then
-	    echo -e "NOT SET"
+		echo -e "NOT SET"
 	else
-	    echo -e "${ip}:${port}"
+		echo -e "${ip}:${port}"
 	fi
 }
 
@@ -160,8 +160,8 @@ fn_info_message_gameserver(){
 	# Server password:  NOT SET
 	# RCON password:    adminF54CC0VR
 	# Players:          0/16
-	# Current Map:      de_mirage
-	# Default Map:      de_mirage
+	# Current map:      de_mirage
+	# Default map:      de_mirage
 	# Game type:        0
 	# Game mode:        0
 	# Tick rate:        64
@@ -245,7 +245,6 @@ fn_info_message_gameserver(){
 		fi
 
 		# Players
-
 		if [ "${querystatus}" != "0" ]; then
 			if [ -n "${maxplayers}" ]; then
 				echo -e "${lightblue}Maxplayers:\t${default}${maxplayers}"
@@ -273,31 +272,31 @@ fn_info_message_gameserver(){
 			echo -e "${lightblue}Bots:\t${default}${gdbots}"
 		fi
 
-		# Current Map
+		# Current map
 		if [ -n "${gdmap}" ]; then
-			echo -e "${lightblue}Current Map:\t${default}${gdmap}"
+			echo -e "${lightblue}Current map:\t${default}${gdmap}"
+		fi
+
+		# Default map
+		if [ -n "${defaultmap}" ]; then
+			echo -e "${lightblue}Default map:\t${default}${defaultmap}"
 		fi
 
 		if [ -n "${defaultscenario}" ]; then
-			# Current Scenario
+			# Current scenario
 			if [ -n "${gdgamemode}" ]; then
-				echo -e "${lightblue}Current Scenario:\t${default}${gdgamemode}"
+				echo -e "${lightblue}Current scenario:\t${default}${gdgamemode}"
 			fi
 		else
-			# Current Scenario
+			# Current game mode
 			if [ -n "${gdgamemode}" ]; then
-				echo -e "${lightblue}Current Game Mode:\t${default}${gdgamemode}"
+				echo -e "${lightblue}Current game mode:\t${default}${gdgamemode}"
 			fi
 		fi
 
-		# Default Map
-		if [ -n "${defaultmap}" ]; then
-			echo -e "${lightblue}Default Map:\t${default}${defaultmap}"
-		fi
-
-		# Default Scenario
+		# Default scenario
 		if [ -n "${defaultscenario}" ]; then
-			echo -e "${lightblue}Default Scenario:\t${default}${defaultscenario}"
+			echo -e "${lightblue}Default scenario:\t${default}${defaultscenario}"
 		fi
 
 		# Game type
@@ -370,12 +369,12 @@ fn_info_message_gameserver(){
 			echo -e "${lightblue}Map rotation:\t${default}${randommap}"
 		fi
 
-		# Listed on Master Server
-		if [ "${displaymasterserver}" ];then
+		# Listed on Master server
+		if [ -n "${displaymasterserver}" ];then
 			if [ "${displaymasterserver}" == "true" ];then
-				echo -e "${lightblue}Master Server:\t${green}${displaymasterserver}${default}"
+				echo -e "${lightblue}Master server:\t${green}${displaymasterserver}${default}"
 			else
-				echo -e "${lightblue}Master Server:\t${red}${displaymasterserver}${default}"
+				echo -e "${lightblue}Master server:\t${red}${displaymasterserver}${default}"
 			fi
 		fi
 
@@ -708,7 +707,7 @@ fn_info_message_codwaw(){
 	} | column -s $'\t' -t
 }
 
-fn_info_message_dontstarve(){
+fn_info_message_dst(){
 	echo -e "netstat -atunp | grep dontstarve"
 	echo -e ""
 	{
@@ -745,7 +744,8 @@ fn_info_message_factorio(){
 	echo -e ""
 	{
 		echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}"
-		echo -e "> Game\tINBOUND\t${port}\ttcp"
+		echo -e "> Game\tINBOUND\t${port}\tudp"
+		echo -e "> RCON\tINBOUND\t${rconport}\ttcp"
 	} | column -s $'\t' -t
 }
 
@@ -852,11 +852,11 @@ fn_info_message_projectcars(){
 }
 
 fn_info_message_projectzomboid(){
-	echo -e "netstat -atunp | grep java"
+	echo -e "netstat -atunp | grep ProjectZomb"
 	echo -e ""
 	{
 		echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}"
-		echo -e "> Game\tINBOUND\t${port}\tudp"
+		echo -e "> Game/Query\tINBOUND\t${port}\tudp"
 	} | column -s $'\t' -t
 }
 
@@ -902,7 +902,7 @@ fn_info_message_quakelive(){
 	} | column -s $'\t' -t
 }
 
-fn_info_message_realvirtuality(){
+fn_info_message_arma3(){
 	echo -e "netstat -atunp | grep arma3server"
 	echo -e ""
 	# Default port
@@ -914,20 +914,20 @@ fn_info_message_realvirtuality(){
 		echo -e "> Game\tINBOUND\t${port}\tudp"
 		# Don't do arithmetics if ever the port wasn't a numeric value
 		if [ "${port}" -eq "${port}" ]; then
-			echo -e "> Steam: Query\tINBOUND\t$((port+1))\tudp"
+			echo -e "> Query Steam\tINBOUND\t$((port+1))\tudp"
 			echo -e "> Steam: Master traffic\tINBOUND\t$((port+2))\tudp"
 			echo -e "> Undocumented Port\tINBOUND\t$((port+3))\tudp"
 		fi
 	} | column -s $'\t' -t
 }
 
-fn_info_message_refractor(){
+fn_info_message_bf1942(){
 	echo -e "netstat -atunp | grep bf1942_lnxd"
 	echo -e ""
 	{
 		echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}"
 		echo -e "> Game/Query\tINBOUND\t${port}\tudp"
-		echo -e "> Steam: Query\tINBOUND\t${queryport}\tudp"
+		echo -e "> Query Steam\tINBOUND\t${queryport}\tudp"
 	} | column -s $'\t' -t
 }
 
@@ -937,7 +937,7 @@ fn_info_message_risingworld(){
 	{
 		echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}"
 		echo -e "> Game/Query\tINBOUND\t${port}\ttcp/udp"
-		echo -e "> http query\tINBOUND\t${httpqueryport}\ttcp"
+		echo -e "> Query HTTP\tINBOUND\t${httpqueryport}\ttcp"
 		echo -e "> RCON\tINBOUND\t${rconport}\ttcp"
 	} | column -s $'\t' -t
 }
@@ -956,7 +956,7 @@ fn_info_message_rust(){
 	echo -e ""
 	{
 		echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}"
-		echo -e "> Game/Query\tINBOUND\t${port}\ttcp/udp"
+		echo -e "> Game/Query\tINBOUND\t${port}\tudp"
 		echo -e "> RCON\tINBOUND\t${rconport}\ttcp"
 	} | column -s $'\t' -t
 }
@@ -971,8 +971,8 @@ fn_info_message_samp(){
 }
 
 
-fn_info_message_seriousengine35(){
-	echo -e "netstat -atunp | grep Sam3_Dedicate"
+fn_info_message_ss3(){
+	echo -e "netstat -atunp | grep Sam3_Ded"
 	echo -e ""
 	{
 		echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}"
@@ -1104,16 +1104,16 @@ fn_info_message_teamspeak3(){
 }
 
 fn_info_message_teeworlds(){
-	echo -e "netstat -atunp | grep teeworlds_srv"
+	echo -e "netstat -atunp | grep teeworlds"
 	echo -e ""
 	{
 		echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}"
-		echo -e "> Game\tINBOUND\t${port}\ttcp"
+		echo -e "> Game\Query\tINBOUND\t${port}\ttcp"
 	} | column -s $'\t' -t
 }
 
 fn_info_message_terraria(){
-	echo -e "netstat -atunp | grep TerrariaServer"
+	echo -e "netstat -atunp | grep Terraria"
 	echo -e ""
 	{
 		echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}"
@@ -1147,7 +1147,7 @@ fn_info_message_unreal(){
 			echo -e "< UdpLink Port (random)\tOUTBOUND\t${udplinkport}+\tudp"
 		fi
 		if [ "${engine}" != "unreal" ]&&[ "${appid}" != "223250" ]; then
-			echo -e "> GameSpy query\tINBOUND\t${gsqueryport}\tudp\tOldQueryPortNumber=${gsqueryport}"
+			echo -e "> Query (GameSpy)\tINBOUND\t${queryportgs}\tudp\tOldQueryPortNumber=${queryportgs}"
 		fi
 		if [ "${appid}" == "215360" ]; then
 			echo -e "< Master server\tOUTBOUND\t28852\ttcp/udp"
@@ -1174,6 +1174,30 @@ fn_info_message_unreal(){
 	} | column -s $'\t' -t
 }
 
+fn_info_message_unreal2(){
+	fn_info_message_password_strip
+	echo -e "netstat -atunp | grep ucc-bin"
+	echo -e ""
+	{
+		echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL\tINI VARIABLE"
+		echo -e "> Game\tINBOUND\t${port}\tudp\tPort=${port}"
+		echo -e "> Query\tINBOUND\t${queryport}\tudp"
+		if [ "${appid}" != "223250" ]; then
+			echo -e "> Query (GameSpy)\tINBOUND\t${queryportgs}\tudp\tOldQueryPortNumber=${queryportgs}"
+		fi
+		echo -e "> WebAdmin\tINBOUND\t${webadminport}\ttcp\tListenPort=${webadminport}"
+	} | column -s $'\t' -t
+	echo -e ""
+	echo -e "${lightgreen}${servername} WebAdmin${default}"
+	fn_messages_separator
+	{
+		echo -e "${lightblue}WebAdmin enabled:\t${default}${webadminenabled}"
+		echo -e "${lightblue}WebAdmin url:\t${default}http://${ip}:${webadminport}"
+		echo -e "${lightblue}WebAdmin username:\t${default}${webadminuser}"
+		echo -e "${lightblue}WebAdmin password:\t${default}${webadminpass}"
+	} | column -s $'\t' -t
+}
+
 fn_info_message_unreal3(){
 	fn_info_message_password_strip
 	echo -e "netstat -atunp | grep ut3-bin"
@@ -1245,19 +1269,19 @@ fn_info_message_wurmunlimited(){
 	{
 		echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}"
 		echo -e "> Game\tINBOUND\t${port}\ttcp"
-		echo -e "> Game/Query\tINBOUND\t${queryport}\tudp"
+		echo -e "> Query\tINBOUND\t${queryport}\tudp"
 	} | column -s $'\t' -t
 }
 
 fn_info_message_mta(){
-	echo -e "netstat -atunp | grep mta-server64"
+	echo -e "netstat -atunp | grep mta-server"
 	echo -e ""
 	{
 		echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}"
-		echo -e "> Game\tOUTBOUND\t${port}\tudp"
+		echo -e "> Game/Query\tOUTBOUND\t${port}\tudp"
 		echo -e "> HTTP Server\tINBOUND\t${httpport}\ttcp"
 		if [ "${ase}" == "Enabled" ]; then
-			echo -e "> ASE Game_Monitor\tOUTBOUND\t$((${port} + 123))\tudp"
+			echo -e "> Query Port\tOUTBOUND\t${queryport}\tudp"
 		fi
 	} | column -s $'\t' -t
 }
@@ -1306,10 +1330,10 @@ fn_info_message_warfork(){
 
 fn_info_message_select_engine(){
 	# Display details depending on game or engine.
-	if [ "${shortname}" == "sdtd" ]; then
-		fn_info_message_sdtd
-	elif [ "${shortname}" == "ark" ]; then
+	if [ "${shortname}" == "ark" ]; then
 		fn_info_message_ark
+	elif [ "${shortname}" == "arma3" ]; then
+		fn_info_message_arma3
 	elif [ "${shortname}" == "bo" ]; then
 		fn_info_message_ballisticoverkill
 	elif [ "${shortname}" == "bt" ]; then
@@ -1326,6 +1350,8 @@ fn_info_message_select_engine(){
 		fn_info_message_cod4
 	elif [ "${shortname}" == "codwaw" ]; then
 		fn_info_message_codwaw
+	elif [ "${shortname}" == "dst" ]; then
+		fn_info_message_dst
 	elif [ "${shortname}" == "eco" ]; then
 		fn_info_message_eco
 	elif [ "${shortname}" == "etl" ]; then
@@ -1342,6 +1368,8 @@ fn_info_message_select_engine(){
 		fn_info_message_justcause3
 	elif [ "${shortname}" == "kf2" ]; then
 		fn_info_message_kf2
+	elif [ "${shortname}" == "pz" ]; then
+		fn_info_message_projectzomboid
 	elif [ "${shortname}" == "pstbs" ]; then
 		fn_info_message_pstbs
 	elif [ "${shortname}" == "pc" ]; then
@@ -1356,30 +1384,44 @@ fn_info_message_select_engine(){
 		fn_info_message_quakelive
 	elif [ "${shortname}" == "samp" ]; then
 		fn_info_message_samp
+	elif [ "${shortname}" == "sdtd" ]; then
+		fn_info_message_sdtd
 	elif [ "${shortname}" == "squad" ]; then
 		fn_info_message_squad
 	elif [ "${shortname}" == "st" ]; then
 		fn_info_message_stationeers
 	elif [ "${shortname}" == "sof2" ]; then
-	  fn_info_message_sof2
+		fn_info_message_sof2
 	elif [ "${shortname}" == "sol" ]; then
 		fn_info_message_soldat
+	elif [ "${shortname}" == "st" ]; then
+		fn_info_message_starbound
 	elif [ "${shortname}" == "sbots" ]; then
 		fn_info_message_sbots
+	elif [ "${shortname}" == "ss3" ]; then
+		fn_info_message_ss3
+	elif [ "${shortname}" == "terraria" ]; then
+		fn_info_message_terraria
 	elif [ "${shortname}" == "ts3" ]; then
 		fn_info_message_teamspeak3
 	elif [ "${shortname}" == "tu" ]; then
 		fn_info_message_towerunite
+	elif [ "${shortname}" == "tw" ]; then
+		fn_info_message_teeworlds
 	elif [ "${shortname}" == "unt" ]; then
 		fn_info_message_unturned
-	elif [ "${shortname}" == "mohaa" ]; then
-		fn_info_message_mohaa
+	elif [ "${shortname}" == "mc" ]; then
+		fn_info_message_minecraft
 	elif [ "${shortname}" == "mh" ]; then
 		fn_info_message_mordhau
+	elif [ "${shortname}" == "mohaa" ]; then
+		fn_info_message_mohaa
 	elif [ "${shortname}" == "mta" ]; then
 		fn_info_message_mta
 	elif [ "${shortname}" == "mumble" ]; then
 		fn_info_message_mumble
+	elif [ "${engine}" == "bf1942" ]; then
+		fn_info_message_bf1942
 	elif [ "${shortname}" == "rtcw" ]; then
 		fn_info_message_rtcw
 	elif [ "${shortname}" == "rust" ]; then
@@ -1392,32 +1434,16 @@ fn_info_message_select_engine(){
 		fn_info_message_risingworld
 	elif [ "${shortname}" == "wet" ]; then
 		fn_info_message_wolfensteinenemyterritory
-	elif [ "${engine}" == "refractor" ]; then
-		fn_info_message_refractor
-	elif [ "${engine}" == "dontstarve" ]; then
-		fn_info_message_dontstarve
 	elif [ "${engine}" == "goldsource" ]; then
 		fn_info_message_goldsource
-	elif [ "${engine}" == "lwjgl2" ]; then
-		fn_info_message_minecraft
-	elif [ "${engine}" == "projectzomboid" ]; then
-		fn_info_message_projectzomboid
-	elif [ "${engine}" == "realvirtuality" ]; then
-		fn_info_message_realvirtuality
-	elif [ "${engine}" == "seriousengine35" ]; then
-		fn_info_message_seriousengine35
 	elif [ "${engine}" == "source" ]; then
 		fn_info_message_source
 	elif [ "${engine}" == "spark" ]; then
 		fn_info_message_spark
-	elif [ "${engine}" == "starbound" ]; then
-		fn_info_message_starbound
-	elif [ "${engine}" == "teeworlds" ]; then
-		fn_info_message_teeworlds
-	elif [ "${engine}" == "terraria" ]; then
-		fn_info_message_terraria
-	elif [ "${engine}" == "unreal" ]||[ "${engine}" == "unreal2" ]; then
+	elif [ "${engine}" == "unreal" ]; then
 		fn_info_message_unreal
+	elif [ "${engine}" == "unreal2" ]; then
+		fn_info_message_unreal2
 	elif [ "${engine}" == "unreal3" ]; then
 		fn_info_message_unreal3
 	else
diff --git a/lgsm/functions/info_parms.sh b/lgsm/functions/info_parms.sh
index bcc5a0d9d..b0982b0a4 100644
--- a/lgsm/functions/info_parms.sh
+++ b/lgsm/functions/info_parms.sh
@@ -43,11 +43,12 @@ fn_info_parms_dst(){
 }
 
 fn_info_parms_eco(){
-	queryport=${webadminport}
+	queryport=${webadminport:-"0"}
 }
 
 fn_info_parms_factorio(){
 	port=${port:-"0"}
+	queryport=${rconport:-"0"}
 	rconport=${rconport:-"0"}
 	rconpassword=${rconpassword:-"NOT SET"}
 }
@@ -89,18 +90,23 @@ fn_info_parms_mohaa(){
 	defaultmap=${defaultmap:-"NOT SET"}
 }
 
+fn_info_parms_mta(){
+	queryport=$((port + 123))
+}
+
 fn_info_parms_projectzomboid(){
 	adminpassword=${adminpassword:-"NOT SET"}
+  queryport=${port:-"0"}
 }
 
 fn_info_parms_quakeworld(){
 	port=${port:-"0"}
-	queryport=${port}
+	queryport=${port:-"0"}
 }
 
 fn_info_parms_quake2(){
 	port=${port:-"0"}
-	queryport=${port}
+	queryport=${port:-"0"}
 	defaultmap=${defaultmap:-"NOT SET"}
 }
 
@@ -112,20 +118,20 @@ fn_info_parms_realvirtuality(){
 fn_info_parms_risingworld(){
 	servername=${servername:-"NOT SET"}
 	port=${port:-"0"}
-	queryport=${port}
+	queryport=${port:-"0"}
 	httpqueryport=$((port - 1))
 }
 
 fn_info_parms_rtcw(){
 	port=${port:-"0"}
-	queryport="${port}"
+	queryport="${port:-"0"}"
 	defaultmap=${defaultmap:-"NOT SET"}
 }
 
 fn_info_parms_rust(){
 	servername=${servername:-"NOT SET"}
 	port=${port:-"0"}
-	queryport=${port}
+	queryport=${port:-"0"}
 	rconport=${rconport:-"0"}
 	rconpassword=${rconpassword:-"NOT SET"}
 	rconweb=${rconweb:-"NOT SET"}
@@ -134,6 +140,10 @@ fn_info_parms_rust(){
 	tickrate=${tickrate:-"0"}
 }
 
+fn_info_parms_samp(){
+	queryport=${port:-"0"}
+}
+
 fn_info_parms_sof2(){
 	port=${port:-"0"}
 	defaultmap=${defaultmap:-"NOT SET"}
@@ -143,7 +153,7 @@ fn_info_parms_source(){
 	defaultmap=${defaultmap:-"NOT SET"}
 	maxplayers=${maxplayers:-"0"}
 	port=${port:-"0"}
-	queryport=${port}
+	queryport=${port:-"0"}
 	clientport=${clientport:-"0"}
 }
 
@@ -171,24 +181,33 @@ fn_info_parms_stickybots(){
 
 fn_info_parms_sof2(){
 	port=${port:-"0"}
-	queryport=${port}
+	queryport=${port:-"0"}
 	defaultmap=${defaultmap:-"NOT SET"}
 }
 
 fn_info_parms_soldat(){
 	port=${port:-"0"}
-	queryport=${port}
+	queryport=${port:-"0"}
 	servername=${servername:-"NOT SET"}
 	serverpassword=${serverpassword:-"NOT SET"}
 	adminpassword=${adminpassword:-"NOT SET"}
 	maxplayers=${maxplayers:-"0"}
 }
 
+fn_info_parms_ss3(){
+	port=${port:-"0"}
+	queryport=$((port + 1))
+}
+
 fn_info_parms_towerunite(){
 	port=${port:-"0"}
 	queryport=${queryport:-"0"}
 }
 
+fn_info_parms_teeworlds(){
+  queryport=${port:-"0"}
+}
+
 fn_info_parms_unreal(){
 	defaultmap=${defaultmap:-"NOT SET"}
 	queryport=$((port + 1))
@@ -215,7 +234,7 @@ fn_info_parms_unturned(){
 
 fn_info_parms_wf(){
 	port=${port:-"0"}
-	queryport="${port}"
+	queryport="${port:-"0"}"
 	webadminport=${webadminport:-"0"}
 }
 
@@ -255,6 +274,8 @@ elif [ "${shortname}" == "rtcw" ]; then
 # Rust
 elif [ "${shortname}" == "rust" ]; then
 	fn_info_parms_rust
+elif [ "${shortname}" == "samp" ]; then
+  fn_info_parms_samp
 # Rising World
 elif [ "${shortname}" == "rw" ]; then
 	fn_info_parms_risingworld
@@ -268,7 +289,7 @@ elif [ "${shortname}" == "sol" ]; then
 	fn_info_parms_soldat
 # Serious Sam
 elif [ "${shortname}" == "ss3" ]; then
-	fn_info_parms_seriousengine35
+	fn_info_parms_ss3
 elif [ "${engine}" == "source" ]||[ "${engine}" == "goldsource" ]; then
 	fn_info_parms_source
 # Spark
@@ -276,8 +297,12 @@ elif [ "${engine}" == "spark" ]; then
 	fn_info_parms_spark
 elif [ "${shortname}" == "tu" ]; then
 	fn_info_parms_towerunite
+elif [ "${shortname}" == "tw" ]; then
+	fn_info_parms_teeworlds
 elif [ "${shortname}" == "mh" ]; then
 	fn_info_parms_mordhau
+elif [ "${shortname}" == "mta" ]; then
+	fn_info_parms_mta
 # Unreal/Unreal 2 engine
 elif [ "${engine}" == "unreal" ]||[ "${engine}" == "unreal2" ]; then
 	fn_info_parms_unreal
diff --git a/lgsm/functions/query_gamedig.sh b/lgsm/functions/query_gamedig.sh
index 0a256bcab..4f1bc5638 100644
--- a/lgsm/functions/query_gamedig.sh
+++ b/lgsm/functions/query_gamedig.sh
@@ -8,92 +8,21 @@
 # Check if gamedig and jq are installed.
 if [ "$(command -v gamedig 2>/dev/null)" ]&&[ "$(command -v jq 2>/dev/null)" ]; then
 
-		if [ "${engine}" == "idtech3_ql" ]; then
-			local engine="quakelive"
-		elif [ "${shortname}" == "kf2" ]; then
-			local engine="unreal4"
-		fi
-
-		local engine_query_array=( avalanche3.0 barotrauma madness quakelive realvirtuality refractor source goldsource spark starbound unity3d unreal4 wurm )
-		for engine_query in "${engine_query_array[@]}"
-		do
-			if [ "${engine_query}" == "${engine}" ]; then
-				gamedigengine="protocol-valve"
-			fi
-		done
-
-		local engine_query_array=( avalanche2.0 )
-		for engine_query in "${engine_query_array[@]}"
-		do
-			if [ "${engine_query}" == "${engine}" ]; then
-				gamedigengine="jc2mp"
-			fi
-		done
-
-		local engine_query_array=( quake )
-		for engine_query in "${engine_query_array[@]}"
-		do
-			if [ "${engine_query}" == "${engine}" ]; then
-				gamedigengine="protocol-quake1"
-			fi
-		done
-
-		local engine_query_array=( idtech2 iw2.0 )
-		for engine_query in "${engine_query_array[@]}"
-		do
-			if [ "${engine_query}" == "${engine}" ]; then
-				gamedigengine="protocol-quake2"
-			fi
-		done
-
-		local engine_query_array=( idtech3 iw3.0 ioquake3 qfusion )
-		for engine_query in "${engine_query_array[@]}"
-		do
-			if [ "${engine_query}" == "${engine}" ]; then
-				gamedigengine="protocol-quake3"
-			fi
-		done
-
-		local engine_query_array=( lwjgl2 )
-		for engine_query in "${engine_query_array[@]}"
-		do
-			if [ "${engine_query}" == "${engine}" ]; then
-				gamedigengine="minecraft"
-			fi
-		done
-
-		local shortname_query_array=( ts3 )
-		for shortname_query in "${shortname_query_array[@]}"
-		do
-			if [ "${shortname_query}" == "${shortname}" ]; then
-				gamedigengine="teamspeak3"
-			fi
-		done
-
-		local engine_query_array=( unreal )
-		for engine_query in "${engine_query_array[@]}"
-		do
-			if [ "${engine_query}" == "${engine}" ]; then
-				gamedigengine="ut"
-			fi
-		done
-
 	# will bypass query if server offline.
 	check_status.sh
 	if [ "${status}" != "0" ]; then
 		# checks if query is working null = pass.
-		gamedigcmd=$(echo -e "gamedig --type \"${gamedigengine}\" --host \"${ip}\" --query_port \"${queryport}\"|jq")
-		gamedigraw=$(gamedig --type "${gamedigengine}" --host "${ip}" --query_port "${queryport}")
+		gamedigcmd=$(echo -e "gamedig --type \"${querytype}\" --host \"${ip}\" --query_port \"${queryport}\"|jq")
+		gamedigraw=$(gamedig --type "${querytype}" --host "${ip}" --query_port "${queryport}")
 		querystatus=$(echo -e "${gamedigraw}" | jq '.error|length')
 
 		if [ "${querystatus}" != "null" ]; then
-			gamedigcmd=$(echo -e "gamedig --type \"${gamedigengine}\" --host \"${ip}\" --port \"${queryport}\"|jq")
-			gamedigraw=$(gamedig --type "${gamedigengine}" --host "${ip}" --port "${queryport}")
+			gamedigcmd=$(echo -e "gamedig --type \"${querytype}\" --host \"${ip}\" --port \"${queryport}\"|jq")
+			gamedigraw=$(gamedig --type "${querytype}" --host "${ip}" --port "${queryport}")
 			querystatus=$(echo -e "${gamedigraw}" | jq '.error|length')
 
 		fi
 
-
 		# server name.
 		gdname=$(echo -e "${gamedigraw}" | jq -re '.name')
 		if [ "${gdname}" == "null" ]; then
diff --git a/lgsm/functions/query_gsquery.py b/lgsm/functions/query_gsquery.py
index fcfd4edc3..0a41b495b 100644
--- a/lgsm/functions/query_gsquery.py
+++ b/lgsm/functions/query_gsquery.py
@@ -17,10 +17,15 @@ class gsquery:
         self.server_response_timeout = 5
         self.default_buffer_length = 1024
         #
-        sourcequery=[ 'avalanche3.0','barotrauma''madness','quakelive','realvirtuality','refractor','source','goldsource','spark','starbound','unity3d', 'unreal4', 'wurm' ]
-        idtech3query=['idtech3','iw3.0','ioquake3','qfusion']
-        idtech2query=['idtech2','quake','iw2.0']
+        sourcequery=['protocol-valve','avalanche3.0','barotrauma','madness','quakelive','realvirtuality','refractor','source','goldsource','spark','starbound','unity3d','unreal4','wurm']
+        idtech2query=['protocol-quake3','idtech2','quake','iw2.0']
+        idtech3query=['protocol-quake3','iw3.0','ioquake3','qfusion']
         minecraftquery=['minecraft','lwjgl2']
+        jc2mpquery=['jc2mp']
+        mumblequery=['mumbleping']
+        twquery=['teeworlds']
+        unrealquery=['protocol-gamespy1','unreal']
+        unreal2query=['protocol-unreal2','unreal2']
         if self.option.engine in sourcequery:
             self.query_prompt_string = b'\xFF\xFF\xFF\xFFTSource Engine Query\0'
         elif self.option.engine in idtech2query:
@@ -29,12 +34,16 @@ class gsquery:
             self.query_prompt_string = b'\xff\xff\xff\xffgetstatus'
         elif self.option.engine in minecraftquery:
             self.query_prompt_string = b'\xFE\xFD\x09\x3d\x54\x1f\x93'
-        elif self.option.engine == 'avalanche2.0':
+        elif self.option.engine in jc2mpquery:
             self.query_prompt_string = b'\xFE\xFD\x09\x10\x20\x30\x40'
-        elif self.option.engine == 'unreal':
+        elif self.option.engine in mumblequery:
+            self.query_prompt_string = b'\x00\x00\x00\x00\x01\x02\x03\x04\x05\x06\x07\x08'
+        elif self.option.engine in unrealquery:
             self.query_prompt_string = b'\x5C\x69\x6E\x66\x6F\x5C'
-        elif self.option.engine == 'unreal2':
+        elif self.option.engine in unreal2query:
             self.query_prompt_string = b'\x79\x00\x00\x00\x00'
+        elif self.option.engine in twquery:
+            self.query_prompt_string = b"\x04\x00\x00\xff\xff\xff\xff\x05" + bytearray(511)
 
         self.connected = False
         self.response = None
@@ -104,7 +113,7 @@ if __name__ == '__main__':
         action='store',
         dest='engine',
         default=False,
-        help='Engine type: avalanche2.0 avalanche3.0 goldsource idtech2 idtech3 ioquake3 iw2.0 iw3.0 madness quake quakelive realvirtuality refracto source spark starbound unity3d unreal unreal2 unreal4 wurm.'
+        help='Engine type: protocol-valve protocol-quake3 protocol-quake3 protocol-gamespy1 protocol-unreal2 minecraft jc2mp mumbleping teeworlds'
     )
     parser.add_option(
         '-v', '--verbose',