Suggested change to the UCMD extension
Posted: 16 Oct 2009, 22:09
The current state of the UCMD extension (http://www.adcportal.com/wiki/index.php/UCMD) bothers me with its lack of user-friendly command names. Seeing a list of menu items beginning with a + is not going to win any GUI design awards, and you have the unusual situation where the hub is actually inflicting an ugly GUI upon the client!
Another potential issue I see in the spec is the way you specify a 'logical structure' to commands for submenus. This does not appear to allow a menu item which only contains subitems, rather than being an actual command. Therefore, I suggest adding an additional required parameter to UCMD ('name' becomes 'command', the new 'name' is the user-friendly name).
CMD command name
A forward slash (/) indicates the menu level. One slash is a top-level menu item, two slashes indicates a sub-item of the last top-level menu item. A slash followed by no command name indicates the item is only for user-interface display and has no hub command attached to it (e.g. in the following example, Administration is a top-level menu item with three sub-item commands).
CMD / Administration CT3
CMD //+ban Ban TTHMSG\s+ban\\syada CT1
CMD //+kick Kick\sUser TTHHMSG\s+kick\\syada CT2
CMD //+listbans List\sBans CT3
This would produce the following menu:
Administration
---- Ban
---- Kick User
---- List Bans
Note that the structure determination via the forward slash relies on the previous CMD message received being known. It may help the client implementor if a flag is required to indicate the last menu item at every level of every branch of the menu tree.
Another grievance, the format specifiers for strftime should be included in the spec, and classed as reserved keywords, rather than the hub being able to override them. It just makes life more consistant if anybody reading code knows that a %A is going to turn into a 'full weekday name' rather than there being the potential for it to become something else.
Another potential issue I see in the spec is the way you specify a 'logical structure' to commands for submenus. This does not appear to allow a menu item which only contains subitems, rather than being an actual command. Therefore, I suggest adding an additional required parameter to UCMD ('name' becomes 'command', the new 'name' is the user-friendly name).
CMD command name
A forward slash (/) indicates the menu level. One slash is a top-level menu item, two slashes indicates a sub-item of the last top-level menu item. A slash followed by no command name indicates the item is only for user-interface display and has no hub command attached to it (e.g. in the following example, Administration is a top-level menu item with three sub-item commands).
CMD / Administration CT3
CMD //+ban Ban TTHMSG\s+ban\\syada CT1
CMD //+kick Kick\sUser TTHHMSG\s+kick\\syada CT2
CMD //+listbans List\sBans CT3
This would produce the following menu:
Administration
---- Ban
---- Kick User
---- List Bans
Note that the structure determination via the forward slash relies on the previous CMD message received being known. It may help the client implementor if a flag is required to indicate the last menu item at every level of every branch of the menu tree.
Another grievance, the format specifiers for strftime should be included in the spec, and classed as reserved keywords, rather than the hub being able to override them. It just makes life more consistant if anybody reading code knows that a %A is going to turn into a 'full weekday name' rather than there being the potential for it to become something else.