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
| Module | Description |
|---|---|
mod_auth_simple | Authenticate users based on a read-only text file. |
mod_auth_sqlite | Authenticate users based on a SQLite database. |
mod_logging | Logs users entering and leaving the hub. |
mod_welcome | Sends a welcome message (and rules / MOTD) to users when they log in. |
mod_chat_history | Provides a global chat history log. |
mod_chat_history_sqlite | Provides a global chat history log backed by SQLite. |
mod_chat_only | Chat-only hub: disables connection setup, search and results. |
mod_chat_is_privileged | Only registered users can send messages in the main chat. |
mod_topic | Adds commands for changing the hub topic (description). |
mod_no_guest_downloads | Only registered users can search and initiate transfers. |
mod_example | A 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.