The dialog form has a simple text input for the sender's name.
This can lead to typos or mistakes if the GM wants to send a message
using the same sender name as a previous message.
Add a new function that goes through all the players' histories and
compiles a list of all unique senders, which we can then use to build
a list of hints that will be used to show suggestions when the GM fills
the sender name in the form.
This is currently quite ineficcient as it re-does all the work for every
single dialog.
A better way would be to cache it or store it explicitly somewhere when
we send a message, but this would require a way for the GM to edit it.
Move some generic constants and functions, or supporting functions
to a new file.
This makes the main script smaller and makes it more focused on the
core functionality of the module.
Selecting all present players can be tedious,
especially if they are many or when multiple
messagess need to be sent.
Add two new buttons to the toolbar that allow
pre-filling the form with all connected players,
or all players.
Add translations and icons for those new tools.
Given that send_message_dialog() fills the form with previous inputs
if there are any, we can also provide data to pre-fill the first form.
This can be useful for preset dialogs, like an "all players" dialog
with all players already input.
Add an initial data parameter to send_message_dialog() and add it
to the message list if it is provided.
This is the initial version of the module, for Foundry v12.
It allows GMs to write and send messages to players via socketlib,
storing an history of those messages, and displaying them on the player's
side, with some potential flair, and some controls in the settings.
This *does not work* with Foundry v13, as the toolbar registration process
has changed.