Add broadcast command override

This commit is contained in:
Ben Peddell 2020-03-01 10:17:04 +10:00
parent 94a8b96e74
commit 668082b53b
3 changed files with 9 additions and 1 deletions

View File

@ -605,6 +605,11 @@ default: /path/to/instance/config.Game.ini
`{seconds}`;;
Valid in `msgTimeSeconds`, replaced at runtime with seconds remaining until shutdown
`broadcastcmd`::
Used to override which rcon command to use for server broadcasts - e.g. serverchat
+
default: `broadcast`
`discordWebhookURL`::
Discord Webhook URL - server status messages and update warning messages will be sent through
this if specified

View File

@ -545,7 +545,7 @@ doExitServer() {
# Broadcast message
#
doBroadcast(){
rconcmd "broadcast $1"
rconcmd "${broadcastcmd:-broadcast} $1"
}
#
@ -3418,6 +3418,7 @@ useConfig() {
# This is linked to the directory, not to the instance
arkupdatelockfile="${arkupdatelockfile:-${arkserverdir}/Saved/.ark-update.lock}"
arkupdatetimefile="${arkupdatetimefile:-${arkserverdir}/Saved/.ark-update.time}"
broadcastcmd="${broadcastcmd:-broadcast}"
}
addArkOpt() {

View File

@ -39,6 +39,8 @@ msgWarnShutdownMinutes="This ARK server will shutdown in %d minutes"
msgWarnShutdownSeconds="This ARK server will shutdown in %d seconds"
msgWarnCancelled="Restart cancelled by player request"
#broadcastcmd="serverchat" # Uncomment to use serverchat instead of broadcast
# Notifications
# discordWebhookURL="https://discordapp.com/api/webhooks/{webhook.id}/{webhook.token}"
# notifyMsgShuttingDown="Shutting down"