Skip to content

Commit f492f81

Browse files
committed
feat(newserver): Craftopia
1 parent b529f00 commit f492f81

22 files changed

+247
-4
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,182 @@
1+
##################################
2+
######## Default Settings ########
3+
##################################
4+
# DO NOT EDIT, ANY CHANGES WILL BE OVERWRITTEN!
5+
# Copy settings from here and use them in either:
6+
# common.cfg - applies settings to every instance.
7+
# [instance].cfg - applies settings to a specific instance.
8+
9+
#### Game Server Settings ####
10+
11+
## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters
12+
startparameters="-batchmode -showlogs"
13+
14+
#### LinuxGSM Settings ####
15+
16+
## LinuxGSM Stats
17+
# Send useful stats to LinuxGSM developers.
18+
# https://docs.linuxgsm.com/configuration/linuxgsm-stats
19+
# (on|off)
20+
stats="off"
21+
22+
## Notification Alerts
23+
# (on|off)
24+
25+
# Display IP | https://docs.linuxgsm.com/alerts#display-ip
26+
displayip=""
27+
28+
# More info | https://docs.linuxgsm.com/alerts#more-info
29+
postalert="off"
30+
31+
# Discord Alerts | https://docs.linuxgsm.com/alerts/discord
32+
discordalert="off"
33+
discordwebhook="webhook"
34+
35+
# Email Alerts | https://docs.linuxgsm.com/alerts/email
36+
emailalert="off"
37+
email="email@example.com"
38+
emailfrom=""
39+
40+
# Gotify Alerts | https://docs.linuxgsm.com/alerts/gotify
41+
gotifyalert="off"
42+
gotifytoken="token"
43+
gotifywebhook="webhook"
44+
45+
# IFTTT Alerts | https://docs.linuxgsm.com/alerts/ifttt
46+
iftttalert="off"
47+
ifttttoken="accesstoken"
48+
iftttevent="linuxgsm_alert"
49+
50+
# Mailgun Email Alerts | https://docs.linuxgsm.com/alerts/mailgun
51+
mailgunalert="off"
52+
mailgunapiregion="us"
53+
mailguntoken="accesstoken"
54+
mailgundomain="example.com"
55+
mailgunemailfrom="alert@example.com"
56+
mailgunemail="email@myemail.com"
57+
58+
# Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet
59+
pushbulletalert="off"
60+
pushbullettoken="accesstoken"
61+
channeltag=""
62+
63+
# Pushover Alerts | https://docs.linuxgsm.com/alerts/pushover
64+
pushoveralert="off"
65+
pushovertoken="accesstoken"
66+
pushoveruserkey="userkey"
67+
68+
# Rocket.Chat Alerts | https://docs.linuxgsm.com/alerts/rocket.chat
69+
rocketchatalert="off"
70+
rocketchatwebhook="webhook"
71+
rocketchattoken=""
72+
73+
# Slack Alerts | https://docs.linuxgsm.com/alerts/slack
74+
slackalert="off"
75+
slackwebhook="webhook"
76+
77+
# Telegram Alerts | https://docs.linuxgsm.com/alerts/telegram
78+
# You can add a custom cURL string eg proxy (useful in Russia) in "curlcustomstring".
79+
# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help".
80+
telegramapi="api.telegram.org"
81+
telegramalert="off"
82+
telegramtoken="accesstoken"
83+
telegramchatid=""
84+
curlcustomstring=""
85+
86+
## Updating | https://docs.linuxgsm.com/commands/update
87+
updateonstart="off"
88+
89+
## Backup | https://docs.linuxgsm.com/commands/backup
90+
maxbackups="4"
91+
maxbackupdays="30"
92+
stoponbackup="on"
93+
94+
## Logging | https://docs.linuxgsm.com/features/logging
95+
consolelogging="on"
96+
logdays="7"
97+
98+
## Monitor | https://docs.linuxgsm.com/commands/monitor
99+
# Query delay time
100+
querydelay="1"
101+
102+
## ANSI Colors | https://docs.linuxgsm.com/features/ansi-colors
103+
ansi="on"
104+
105+
#### Advanced Settings ####
106+
107+
## Message Display Time | https://docs.linuxgsm.com/features/message-display-time
108+
sleeptime="0.5"
109+
110+
## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd
111+
# Server appid
112+
appid="1670340"
113+
steamcmdforcewindows="no"
114+
# SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch
115+
branch=""
116+
betapassword=""
117+
# Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server
118+
steammaster="false"
119+
120+
## Stop Mode | https://docs.linuxgsm.com/features/stop-mode
121+
# 1: tmux kill
122+
# 2: CTRL+c
123+
# 3: quit
124+
# 4: quit 120s
125+
# 5: stop
126+
# 6: q
127+
# 7: exit
128+
# 8: 7 Days to Die
129+
# 9: GoldSrc
130+
# 10: Avorion
131+
# 11: end
132+
stopmode="5"
133+
134+
## Query mode
135+
# 1: session only
136+
# 2: gamedig (gsquery fallback)
137+
# 3: gamedig
138+
# 4: gsquery
139+
# 5: tcp
140+
querymode="1"
141+
querytype=""
142+
143+
## Console type
144+
consoleverbose="no"
145+
consoleinteract="yes"
146+
147+
## Game Server Details
148+
# Do not edit
149+
gamename="Craftopia"
150+
engine="unity3d"
151+
glibc="2.17"
152+
153+
#### Directories ####
154+
# Edit with care
155+
156+
## Game Server Directories
157+
systemdir="${serverfiles}"
158+
executabledir="${serverfiles}"
159+
executable="./Craftopia.x86_64"
160+
servercfgdir="${systemdir}"
161+
servercfg="ServerSetting.ini"
162+
servercfgdefault="ServerSetting.ini"
163+
servercfgfullpath="${servercfgdir}/${servercfg}"
164+
165+
## Backup Directory
166+
backupdir="${lgsmdir}/backup"
167+
168+
## Logging Directories
169+
logdir="${rootdir}/log"
170+
#gamelogdir="${serverfiles}"
171+
lgsmlogdir="${logdir}/script"
172+
consolelogdir="${logdir}/console"
173+
gamelog="${gamelogdir}/${selfname}-game.log"
174+
lgsmlog="${lgsmlogdir}/${selfname}-script.log"
175+
consolelog="${consolelogdir}/${selfname}-console.log"
176+
alertlog="${lgsmlogdir}/${selfname}-alert.log"
177+
postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log"
178+
179+
## Logs Naming
180+
gamelogdate="${gamelogdir}/${selfname}-game-$(date '+%Y-%m-%d-%H:%M:%S').log"
181+
lgsmlogdate="${lgsmlogdir}/${selfname}-script-$(date '+%Y-%m-%d-%H:%M:%S').log"
182+
consolelogdate="${consolelogdir}/${selfname}-console-$(date '+%Y-%m-%d-%H:%M:%S').log"

lgsm/data/almalinux-8.csv

+1
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ cs
3232
cscz
3333
csgo
3434
css,ncurses-libs.i686
35+
ct
3536
dab
3637
dayz
3738
dmc

lgsm/data/almalinux-9.csv

+1
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ cs
3232
cscz
3333
csgo
3434
css,ncurses-libs.i686
35+
ct
3536
dab
3637
dayz
3738
dmc

lgsm/data/centos-7.csv

+1
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ cs
3232
cscz
3333
csgo
3434
css,ncurses-libs.i686
35+
ct
3536
dab
3637
dayz
3738
dmc

lgsm/data/centos-8.csv

+1
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ cs
3232
cscz
3333
csgo
3434
css,ncurses-libs.i686
35+
ct
3536
dab
3637
dayz
3738
dmc

lgsm/data/centos-9.csv

+1
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ cs
3232
cscz
3333
csgo
3434
css,ncurses-libs.i686
35+
ct
3536
dab
3637
dayz
3738
dmc

lgsm/data/debian-10.csv

+1
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ cs
3232
cscz
3333
csgo
3434
css,libtinfo5:i386
35+
ct
3536
dab
3637
dayz
3738
dmc

lgsm/data/debian-11.csv

+1
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ cs
3232
cscz
3333
csgo
3434
css,libtinfo5:i386
35+
ct
3536
dab
3637
dayz
3738
dmc

lgsm/data/debian-9.csv

+1
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ cs
3232
cscz
3333
csgo
3434
css,libtinfo5:i386
35+
ct
3536
dab
3637
dayz
3738
dmc

lgsm/data/rhel-7.csv

+1
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ cs
3232
cscz
3333
csgo
3434
css,ncurses-libs.i686
35+
ct
3536
dab
3637
dayz
3738
dmc

lgsm/data/rhel-8.csv

+1
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ cs
3232
cscz
3333
csgo
3434
css,ncurses-libs.i686
35+
ct
3536
dab
3637
dayz
3738
dmc

lgsm/data/rhel-9.csv

+1
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ cs
3232
cscz
3333
csgo
3434
css,ncurses-libs.i686
35+
ct
3536
dab
3637
dayz
3738
dmc

lgsm/data/rocky-8.csv

+1
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ cs
3232
cscz
3333
csgo
3434
css,ncurses-libs.i686
35+
ct
3536
dab
3637
dayz
3738
dmc

lgsm/data/rocky-9.csv

+1
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ cs
3232
cscz
3333
csgo
3434
css,ncurses-libs.i686
35+
ct
3536
dab
3637
dayz
3738
dmc

lgsm/data/serverlist.csv

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ cs,csserver,Counter-Strike 1.6,ubuntu-22.04
3030
cscz,csczserver,Counter-Strike: Condition Zero,ubuntu-22.04
3131
csgo,csgoserver,Counter-Strike: Global Offensive,ubuntu-22.04
3232
css,cssserver,Counter-Strike: Source,ubuntu-22.04
33+
ct,ctserver,Craftopia,ubuntu-22.04
3334
dab,dabserver,Double Action: Boogaloo,ubuntu-22.04
3435
dayz,dayzserver,DayZ,ubuntu-22.04
3536
dmc,dmcserver,Deathmatch Classic,ubuntu-22.04
@@ -128,4 +129,3 @@ wmc,wmcserver,WaterfallMC,ubuntu-22.04
128129
wurm,wurmserver,Wurm Unlimited,ubuntu-22.04
129130
zmr,zmrserver,Zombie Master: Reborn,ubuntu-22.04
130131
zps,zpsserver,Zombie Panic! Source,ubuntu-22.04
131-

lgsm/data/ubuntu-20.04.csv

+1
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ cs
3232
cscz
3333
csgo
3434
css,libtinfo5:i386
35+
ct
3536
dab
3637
dayz
3738
dmc

lgsm/data/ubuntu-21.04.csv

+1
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ cs
3232
cscz
3333
csgo
3434
css,libtinfo5:i386
35+
ct
3536
dab
3637
dayz
3738
dmc

lgsm/data/ubuntu-21.10.csv

+1
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ cs
3131
cscz
3232
csgo
3333
css,libtinfo5:i386
34+
ct
3435
dab
3536
dmc
3637
dod

lgsm/data/ubuntu-22.04.csv

+1
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ cs
3232
cscz
3333
csgo
3434
css,libtinfo5:i386
35+
ct
3536
dab
3637
dayz
3738
dmc

lgsm/modules/info_game.sh

+23-1
Original file line numberDiff line numberDiff line change
@@ -483,7 +483,27 @@ fn_info_game_col() {
483483
fi
484484
}
485485

486-
fn_info_game_dodr() {
486+
fn_info_game_ct(){
487+
if [ ! -f "${servercfgfullpath}" ]; then
488+
servername="${unavailable}"
489+
gamemode="${unavailable}"
490+
maxplayers="${zero}"
491+
port="${zero}"
492+
serverpasswordenabled="${unavailable}"
493+
serverpassword="${unavailable}"
494+
saveinterval="${zero}"
495+
else
496+
servername=$(sed -nr 's/^name=(.*)$/\1/p' "${servercfgfullpath}")
497+
gamemode=$(sed -nr 's/^gameMode=([0-9]+)/\1/p' "${servercfgfullpath}")
498+
port=$(sed -nr 's/^port=([0-9]+)/\1/p' "${servercfgfullpath}")
499+
maxplayers=$(sed -nr 's/^maxPlayerNumber=([0-9]+)/\1/p' "${servercfgfullpath}")
500+
serverpasswordenabled=$(sed -nr 's/^usePassword=([0-9]+)/\1/p' "${servercfgfullpath}")
501+
serverpassword=$(sed -nr 's/^serverPassword=(.*)$/\1/p' "${servercfgfullpath}")
502+
saveinterval=$(sed -nr 's/^autoSaveSec=([0-9]+)/\1/p' "${servercfgfullpath}")
503+
fi
504+
}
505+
506+
fn_info_game_dodr(){
487507
# Config
488508
if [ ! -f "${servercfgfullpath}" ]; then
489509
maxplayers="${zero}"
@@ -2409,6 +2429,8 @@ elif [ "${shortname}" == "codwaw" ]; then
24092429
fn_info_game_codwaw
24102430
elif [ "${shortname}" == "col" ]; then
24112431
fn_info_game_col
2432+
elif [ "${shortname}" == "ct" ]; then
2433+
fn_info_game_ct
24122434
elif [ "${shortname}" == "dayz" ]; then
24132435
fn_info_game_dayz
24142436
elif [ "${shortname}" == "dodr" ]; then

0 commit comments

Comments
 (0)