Suggesting an extension to provide clickable commands in mainchat/pm. It has been discussed before on ADC Portal, but since that went offline, I'll start from here.
This extension enables highlighted clickable text in mainchat or pm.
The highlighted text can offer these features:
- when clicked it activates an included UCMD, allowing to send hubcommands directly, or use a dialog for userinput
- when rightclicked it could show options to choose from, each with it's own UCMD
Example:
<client> !hubrules
<hub> The following rules are set:
- maxusers:
600 (clicking will open a popup to set a number)
- minshare:
0 (clicking will open a popup to set a number, rightclicking could show some predefined settings to choose from)
- allowpassive:
false (clicking will set it to true, rightclicking will show the two options)
- redirectmode:
normal (clicking will show a popup to type the mode, rightclicking will show the different options to choose from)
Protocol:
With a few additions the magnet URI scheme could be used, suggestions as to how that can be done best are welcome. The main idea is to send included UCMD's to determine the actions for the link.
Implementation:
For security reasons only hub-to-client traffic should be able to send these clickable commands. It's too easy to send harmless looking links that execute hubcommands otherwise.