User Command
Command Types:
- Separator
- Adds a separator to the menu
- Raw
- Sends raw command to the hub (experts only, end it with '|' in NMDC hubs and '\n' in ADC hubs!)
- Chat
- Sends command as if you were typing it in the chat
- PM
- Sends command as if you sent it by PM
Context
Contexts determine where the command is shown.
- Hub Menu
- Hub tab (at the top of the screen) context menu
- User Menu
- User context menu in chat and PM tab menu
- Search Menu
- Search context menu
- File list Menu
- File list context menu
Parameters
- Name
- Name as displayed in the menu (use '/' to create sub-menus, and '//' to actually write a slash)
- Command
- Command text (may contain any of the variables listed below). Use Ctrl + Enter to create a new line.
- Hub address
-
Hub address as typed when connecting. "op" = NMDC hubs where you are an operator, "adc://" = all
ADC hubs, "adc://op" = ADC hubs where you are an operator, "adcs://" = all
secured ADC hubs. If empty, and the "Raw" type is selected,
then only NMDC hubs will match; if empty, and the "Chat" or "Private Message" types are selected,
then all hubs will match regardless of their protocol.
- To
- Private Message recipient
- Send once per nick.
-
Send only once per user from search or file lists, regardless of how many files have been
selected per user.
Variables
In the parameters, you can use %[xxx]
variables and date/time
specifiers (%Y, %m, ...). The following variables are also
available:
- %[fileFN]: Filename (search, file list, and transfer view contexts only)
- %[fileSIsize]: File size (search, file list contexts only)
- %[fileSIshort]: File size, short version including units (search, file list contexts only)
- %[fileTR]: TTH for the file, or "NONE" (search, file list contexts only)
- %[fileMN]:
magnet link
to the file (search, file list contexts only)
- %[type]: "File" or "Directory" (directory context only)
-
%[line:caption]: Opens up a dialog asking for "caption".
By default, the input interface is a text-box control, unless "caption" corresponds to
the following syntax: caption/default_sel/value0/value1/.../valueN where caption is the
new caption, default_sel is a number corresponding to the default value to select, and
the following params are values of a drop-down list control created instead of the text-box.
Params are separated using forward slashes ('/'); one can use '//' to actually write a slash.
In addition to these variables, all of the ADC INF flags are available, with the following prefixes: my, user, and hub. Some may not be available on NMDC hubs. Many useful ones are enumerated below:
- %[myNI]: Your nick
- %[myCID]: Your ADC CID
- %[userNI]: The user's nick
- %[userCID]: The user's ADC CID
- %[userI4]: The user's IP (if supported by hub)
- %[userTAG]: The user's tag
- %[userDE]: The user's description
- %[userEM]: The user's email
- %[userSS]: The user's shared bytes (exact)
- %[userSSshort]: The user's shared bytes (formatted with units)
Compatibilty Variables
- %[mynick] = %[myNI]
- %[nick] = %[userNI]
- %[file] = %[fileFN]
- %[filesize] = %[fileSI]
- %[filesizeshort] = %[fileSIshort]
- %[tth] = %[fileTR]
- %[mycid] = %[myCID]
- %[cid] = %[userCID]
- %[ip] = %[userI4]
- %[tag] = %[userTAG]
- %[description] = %[userDE]
- %[email] = %[userEM]
- %[share] = %[userSS]
- %[shareshort] = %[userSSshort]