Adds a mod_ucmd plugin which uses the previously added user command
plugin functions to send user commands when users log in. These are read
from a text file in a simple format. They can be restricted to users
with certain credentials, and can have multiple actions (e.g., send a PM
and a message in the main chat).
A sample user command file for the standard uhub commands is at
doc/ucmd.conf, and will be automatically installed if appropriate.
This currently won't send commands to existing users (e.g., if the
plugin is (re)loaded after the hub is already up and running). To
support this, a plugin function to list all current users would need to
be added.
I'm not sure how efficient this would be due to the volume of
messages needed to delete the existing commands on shutdown and send
them again on startup. As the commands are reloaded properly within the
plugin, it may be easier to require users to reconnect after the
configuration changes (and, of course, an admin could force this by
restarting the hub).
This reverts commit 66215cc535.
This database is not created correctly.
Instead, create a database with the uhub-passwd tool:
uhub-passwd users.db create
The mod_chat_history plugin provides chat history for all public chat messages.
Can be configured in the following ways:
- history_max: max number of messages stored in history
- history_default: the default number of messages to be returned when invoking !history
- history_connect: if > 0, then this number of messages is automatically sent when connecting to the hub
Removed the built-in !history command in favour of the mod_chat_history plug-in.
Make sure we unescape all chat messages before forwarding any of them to plugins.
Update example plugins.conf in documentation directory.