diff --git a/Discord.ps1 b/Discord.ps1 index 1bf4a6d..c7e8a59 100644 --- a/Discord.ps1 +++ b/Discord.ps1 @@ -49,6 +49,9 @@ begin { if ( ! $botName) { $botName = $DISCORD_SERVER_NAME } + if ($title) { + $title = "$title $DISCORD_TITLE_SUFFIX" + } } # load internal function diff --git a/config.example.ps1 b/config.example.ps1 index b9f8c57..df985f6 100644 --- a/config.example.ps1 +++ b/config.example.ps1 @@ -2,6 +2,8 @@ $DISCORD_SERVER_NAME = "" +$DISCORD_TITLE_SUFFIX = "$DISCORD_SERVER_NAME" + $DISCORD_WINDOWS_HOOK = "?wait=true" $DYNV6_ZONE = "" diff --git a/config.example.sh b/config.example.sh index 7e4f078..eefe9a4 100644 --- a/config.example.sh +++ b/config.example.sh @@ -25,5 +25,7 @@ SERVER_DOMAIN="localhost" DISCORD_SERVER_NAME="" +DISCORD_TITLE_SUFFIX="$DISCORD_SERVER_NAME" + DISCORD_GENERAL_HOOK="?wait=true" diff --git a/discord.sh b/discord.sh index ee88c90..037583d 100755 --- a/discord.sh +++ b/discord.sh @@ -90,6 +90,9 @@ if [[ -f "$configFile" ]]; then if [[ -z "$hookUrl" ]]; then hookUrl="$DISCORD_GENERAL_HOOK" fi + if [[ -n "$title" ]]; then + title="$title $DISCORD_TITLE_SUFFIX" + fi fi # stop if we have no hook to send message to