mod_ucmd
Hub commands as client context menus. Part of the bundled plug-ins.
mod_ucmd publishes the hub's registered commands as ADC user command
(UCMD) entries, so they appear in the right-click menus of clients that support the extension
— DC++, AirDC++ and others. Selecting an entry makes the client send the corresponding
+command on the user's behalf, so operators get a menu instead of having to
remember command syntax.
Added in 0.7.1. In 0.8.0 the extension is advertised
correctly as UCMD (0.7.1 announced it as UCM0), only advertised
when this plug-in is actually loaded, and command entries are only sent to clients that
negotiated the extension.
Loading
plugin /var/lib/uhub/mod_ucmd.so
Configuration
This plug-in takes no parameters.
Behaviour
When a user logs in, the plug-in enumerates every hub command available at that user's
credential level and publishes one menu entry per command. A guest sees only guest-level
commands; an operator sees the operator set. Commands registered by other plug-ins are
included automatically — nothing needs to know about mod_ucmd.
Entries are grouped under a top-level uhub submenu and named after the command's
description, falling back to the command word itself. Where an entry appears depends on what
the command takes:
| Command takes | Menu | Client fills in |
|---|---|---|
| A nick or CID argument | User list / chat | The nick or CID of the user you clicked. |
| Anything else | Hub / main chat | Prompts for each argument — a message, number, address, password, … |
So !kick, !ban and !getip land in the user-list menu
already targeting the right user, while hub-wide commands such as !motd or
!uptime land in the hub menu. Optional arguments are left out of the generated
entry, so the menu prompts only for what the command requires.
Clients that did not negotiate UCMD are unaffected: nothing is sent to them, and the commands remain available by typing them in chat as usual.