Comment 3 for bug 435024

Revision history for this message
Steven Sheehy (steven-sheehy) wrote : Re: ADC CMD with context 1 are not installed in the menu

The context is where the command is supposed to appear in the UI and as a result this affects what parameters are available for substitution. First command could in theory be either hub or chat since mySID is available for all contexts (technically speaking, logically the command may not make sense in chat). The second could only be chat since userSID would not be available for hub context.

Parameter substitution is not done when the command is received from the hub, it is done at the time the user right clicks and the menu is prepared. Thus, the core doesn't care what context is received from the hub for a command, it simply adds it to its list and makes it available to the UI. It's only when the UI requests the list of commands does the context matter. You request commands from the core by passing in a desired context and the core retrieves only what commands have that context. If you request context 1, it will only show up in hub menu (though this again not implemented). If you request context 2 it will show up in the user list right click menu. If you request context 3 it will show up in both user list and hub menu since 3 equals 1 OR 2 in binary.