Keep join messages on the controller and print them from the instance

Join messages were stored in exp_legacy's PlayerData, which nothing
ever synced. The controller now keeps a players.json datastore of
per-player settings keyed by player name, starting with the join
message, and saves it on the save and shutdown hooks. Records with
nothing set are removed.

When a player joins, the instance plugin fetches their record and
prints the message to everyone over rcon in the player's colour, so no
lua is needed to show it. The in-game /set-join-message and
/remove-join-message commands send ipc which the instance forwards to
the controller; /set-join-message without a message asks the instance,
which prints the stored message back to the player.

Greetings is now a feature. Disabling it stops the greeting, the
commands, and the printed join messages. The private greeting with the
community name and Discord link is shown to every joining player, even
those with a join message, since one is a welcome for the player and
the other an announcement to everyone else.

Two controller permissions cover the web interface:
exp_scenario.join_message.set for your own message and .set_other for
anyone's, checked against the requesting user the same way
exp_discord_auth checks unlinking. The seed grants them to Supporter
and Moderator alongside the in-game commands. The user page gets a
Scenario section showing the message with an edit button for users who
may change it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
bbassieandClaude Opus 5.5 committed 2026-10-14 22:10:31 +00:00
1 parent 4d3c4de5b1
commit 6821d62c10
17 files changed
+491 -40

No files matched your search

-3
View File
@@ -15,9 +15,6 @@ lhd=All trains must be LHD! This is a long standing rule on our servers, please
# data
[exp-settings]
JoinMessage=Join Message
JoinMessage-tooltip=The message displayed when you join
JoinMessage-value-tooltip=Change by using /join-message
UsesServerUps=Server UPS
UsesServerUps-tooltip=Whether the current server UPS is shown
UsesServerUps-value-tooltip=Change by using /server-ups
-3
View File
@@ -15,9 +15,6 @@ lhd=列車必須是左則通行。這是本服務器長久以來的規則。
# data
[exp-settings]
JoinMessage=加入信息
JoinMessage-tooltip=你加入時所顯示的信息
JoinMessage-value-tooltip=使用 /join-message 來更換加入信息
UsesServerUps=服務器更新數 (SUPS)
UsesServerUps-tooltip=現在是否顯示服務器更新數 (SUPS)
UsesServerUps-value-tooltip=使用 /server-ups 來更換顯示
-3
View File
@@ -15,9 +15,6 @@ lhd=列車必須是左則通行。這是本服務器長久以來的規則。
# data
[exp-settings]
JoinMessage=加入信息
JoinMessage-tooltip=你加入時所顯示的信息
JoinMessage-value-tooltip=使用 /join-message 來更換加入信息
UsesServerUps=服務器更新數 (SUPS)
UsesServerUps-tooltip=現在是否顯示服務器更新數 (SUPS)
UsesServerUps-value-tooltip=使用 /server-ups 來更換顯示