CLCK - Clickable commands in mainchat/pm

Ideas for ADC may be presented here for others to review and point out flaws or further improve the idea.
Forum rules
If you have an account on the wiki, remember to update the ADC Proposals page for new ideas.

http://dcbase.org/wiki/ADC_Proposals_list
Locked
Pretorian
Site Admin
Posts: 214
Joined: 21 Jul 2009, 10:21

CLCK - Clickable commands in mainchat/pm

Post by Pretorian » 20 Nov 2012, 21:38

This comes from http://www.flexhub.org/forum/index.php?topic=336.0
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.

Locked