uhub/doc/plugins.conf
Blair Bonnett 2e7f0f9c12 Add plugin to send user commands.
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).
2012-08-08 19:34:19 +12:00

68 lines
2.4 KiB
Plaintext

# ATTENTION!
# Plugins are invoked in the order of listing in the plugin config file.
# Sqlite based user authentication.
#
# This plugin provides a Sqlite based authentication database for
# registered users.
# Use the uhub-passwd utility to create the database and add/remove users.
#
# Parameters:
# file: path/filename for database.
#
plugin /var/lib/uhub/mod_auth_sqlite.so "file=/etc/uhub/users.db"
# Log file writer
#
# Parameters:
# file: path/filename for log file.
# syslog: if true then syslog is used instead of writing to a file (Unix only)
plugin /var/lib/uhub/mod_logging.so "file=/var/log/uhub.log"
# A simple example plugin
# plugin /var/lib/uhub/mod_example.so
# A plugin sending a welcome message.
#
# This plugin provides the following commands:
# !motd - Message of the day
# !rules - Show hub rules.
#
# Parameters:
# motd: path/filename for the welcome message (message of the day)
# rules: path/filenam for the rules file
#
# NOTE: The files MUST exist, however if you do not wish to provide one then these parameters can be omitted.
#
# The motd/rules files can do the following substitutions:
# %n - Nickname of the user who entered the hub or issued the command.
# %a - IP address of the user
# %c - The credentials of the user (guest, user, op, super, admin).
# %% - Becomes '%'
# %H - Hour 24-hour format (00-23) (Hub local time)
# %I - Hour 12-hour format (01-12) (Hub local time)
# %P - 'AM' or 'PM'
# %p - 'am' or 'pm'
# %M - Minutes (00-59) (Hub local time)
# %S - Seconds (00-60) (Hub local time)
plugin /var/lib/uhub/mod_welcome.so "motd=/etc/uhub/motd.txt rules=/etc/uhub/rules.txt"
# Load the chat history plugin.
#
# This plugin provides chat history when users are connecting, or
# when users invoke the !history command.
# The history command can optionally take a parameter to indicate how many lines of history is requested.
#
# Parameters:
# history_max: the maximum number of messages to keep in history
# history_default: when !history is provided without arguments, then this default number of messages are returned.
# history_connect: the number of chat history messages to send when users connect (0 = do not send any history)
plugin /var/lib/uhub/mod_chat_history.so "history_max=200 history_default=10 history_connect=5"
# A plugin to send user commands.
#
# Parameters:
# file: the file where the list of user commands is stored.
plugin /var/lib/uhub/mod_ucmd.so "file=/etc/uhub/ucmd.conf"