Missing hub context user commands

Bug #435024 reported by dairinin
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
LinuxDC++
Confirmed
Wishlist
Unassigned

Bug Description

Hello, guys.

I'm trying to launch ADC hub atm, and found a problem with hubmenu items not being installed, when their context is 1. So there is an example. This command from hub does not create menu item:
ICMD Commands\\Hub\\Userlist\\all TTBMSG\s%[mySID]\s+userlist CT1

And this does:
ICMD Commands\\Userinfo TTBMSG\s%[mySID]\s+userinfo\ssid\s%[userSID] CT2

Revision history for this message
Steven Sheehy (steven-sheehy) wrote :

Context 2 means it should show up in chat right click user menu item. Context 1 is hub context and should only show up in hub tab right click menu at the top of the screen. However, the latter is not implemented and I'm not sure it will ever be implemented because it seems pretty pointless. Based on your command you need the parameters to be replaced with user data so you probably only want it shown in chat menu (context 2).

Revision history for this message
dairinin (nowhere-hakkenden) wrote :

Steven, thanks for the reply

I always thought, that context means parameter substitusion, so the first command is definetely a hub-level command. According to ADC 1.0 spec, mySID is available in hub context, and no other data is required - hence it IS context 1, IMHO.
Well, afaik NMDC also provides contexts for commands, and they are always show up in userlist right-click menu, and this is expected behavior. Maybe with ADC client should also place all commands in userlist menu?

Revision history for this message
Steven Sheehy (steven-sheehy) wrote :

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.

Revision history for this message
Steven Sheehy (steven-sheehy) wrote :

What is the status of this bug? Can it be closed or did my explanation not make sense?

Changed in linuxdcpp:
status: New → Incomplete
Revision history for this message
dairinin (nowhere-hakkenden) wrote :

Your explanation is clear. What about the idea to include hub-context commands into userlist menu, as with nmdc?

Revision history for this message
Steven Sheehy (steven-sheehy) wrote :

You're saying instead of placing hub context commands on right click tab popup, to place them in userlist popup along with chat context? How would you separate the two? Currently chat context is in "User commands" sub-menu.

Revision history for this message
dairinin (nowhere-hakkenden) wrote :

Please, ignore my last message. Although it's a pity that program does not fully conforms to ADC specs, the idea to place hub-context into user-context is a total mess. Sorry for troubles, the bug should be closed.

Revision history for this message
Steven Sheehy (steven-sheehy) wrote :

We probably need to add hub context user commands somewhere. Not in the user list menu, but somewhere else is probably okay.

summary: - ADC CMD with context 1 are not installed in the menu
+ Missing hub context user commands
Changed in linuxdcpp:
importance: Undecided → Wishlist
status: Incomplete → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.