Plug-ins

uhub ships with a set of loadable C plug-ins. Enable them in plugins.conf by pointing at the built .so file with an optional configuration string.

On Unix systems, a plug-in is loaded like this:

plugin /var/lib/uhub/mod_logging.so "file=/var/log/uhub/uhub.log"

On Windows, point at the .dll instead:

plugin c:\path\to\mod_logging.dll "file=c:\uhub\uhub.log"

Bundled plug-ins

ModuleDescription
mod_auth_simpleAuthenticate users based on a read-only text file.
mod_auth_sqliteAuthenticate users based on a SQLite database.
mod_loggingLogs users entering and leaving the hub.
mod_welcomeSends a welcome message (and rules / MOTD) to users when they log in.
mod_chat_historyProvides a global chat history log.
mod_chat_history_sqliteProvides a global chat history log backed by SQLite.
mod_chat_onlyChat-only hub: disables connection setup, search and results.
mod_chat_is_privilegedOnly registered users can send messages in the main chat.
mod_topicAdds commands for changing the hub topic (description).
mod_no_guest_downloadsOnly registered users can search and initiate transfers.
mod_exampleA simple example plug-in to base your own on.

Example configuration

A typical plugins.conf combining several modules:

plugin /var/lib/uhub/mod_auth_sqlite.so "file=/etc/uhub/users.db"
plugin /var/lib/uhub/mod_logging.so "file=/var/log/uhub/uhub.log"
plugin /var/lib/uhub/mod_welcome.so "motd=/etc/uhub/motd.txt rules=/etc/uhub/rules.txt"
plugin /var/lib/uhub/mod_chat_history.so "history_max=200 history_default=10 history_connect=5"

Want to write your own? See the plug-in API documentation.