This is the list of all supported commands and their syntax.

In the following description, * is a character used as separator. It should not
appear anywhere else inside the line (except as separator). * can be anything
except \r, \n (return), \0 and space (0x20) and a Direct connect special 
characteres. Direct connect reserves 2 characteres you cannot use: | and $

Argument between [] can be omitted.

At the end of the description of a command, you may see "  = precmd". This means
you can also use this command with the --precmd flag.

--------------------------------------------------------------------------------
/DL *nick*[localfic]*remotefic*[start_pos]

* Download from a user (nick) a file (remotefic) and save it (localfic). 
  The download starts at the position start_pos (0=1st byte).
  If localfic is omitted, the client uses the current directory and the
  filename part of remotefic.
  If start_pos is omitted (the last * must be here), the client uses current
  local file size as value (=resume from the end).

  Note: 
  * The client supports both active and passive download (behind firewall).
  * A transfer may fails when starting for one of the following reason:
           + you and the other user both are behind firewall. Direct connect
             protocol can't handle this. 
           + the client and the other user client fail to establish a connection
             due to a network problem.
           + the client and the other user client fail to establish a connection
             because they can't agree on what to do. Both want to download or
             upload.
           + you want to download and the other want to upload (and vice-versa).
             Only one of the 2 transfers starts, the other must be restarted.

  Since V 0.51
  * The client supports auto-resume. Tasks are kept if the download fails due to
    network error (the client tries to restart the download 30 seconds later),
    the user remote client doesn't reply (the user is perhaps no more on the
    hub) (the client will try to restart the download 1 minute later).

  Note for program source readers only:
  * You can see /DL has another parameter after start_pos. This optionnal
    parameter is a host address and a host port. It is not possible to enter a
    command with this parameter (the parameter is discarded). This parameter is
    the last known transfer address (and port) of the user having the given
    nickname. DCTC doesn't use this parameter but stores it (when exists) when 
    it internally creates download requests (requeued failed transfers). This 
    parameter will be (is) used by DCSADL (when available).

--------------------------------------------------------------------------------
/SRCH *pattern*filetype

* search something on the current hub.
  pattern is what you want to search.
  filetype is one of the following values: 1=any,2=audio,3=compressed,
   4=document,5=exe,6=picture,7=videos,8=folder

/SRCH *pattern*filetype*sizetype*size

* same function as previous one but with a given size.
  sizetype can be 'L' if it is "at least size" or 'M' for "at most size".
  size is the size you want to use (in bytes).

--------------------------------------------------------------------------------
/CSRCH *localfile*filetype
/CSRCH *localfile*filetype*sizetype*size

* start a search by file content on the hub. This function try to find a file
  having the same content as the one you gave. For compatibility issue, the
  command also tries to find files with the same name. The local file must be
  inside the download directory.

  See /SRCH for more information.

  This function is a protocol extension and is not supported by DC.DC Compatible
  client may support this feature, contact your client author for more
  information.

--------------------------------------------------------------------------------
/MSRCH *pattern*filetype
/MSRCH *pattern*filetype*sizetype*size

* start a multi-hub search. See /SRCH for more information.

--------------------------------------------------------------------------------
/CHAT msg

* send a message (msg) to the public chat.

--------------------------------------------------------------------------------

/PRIV *nick*msg

* send a private message (msg) to a user (nick)

--------------------------------------------------------------------------------
/XFER

* display the list of all running transfers (upload, download, idle)

/XFERKB

* same as /XFER except only "CMDKB]" messages are displayed.

--------------------------------------------------------------------------------
/DESC desc

* change your description to a new one (desc). 
  desc can be empty but be careful, in this case, the space after DESC is
  mandatory.

  = precmd

--------------------------------------------------------------------------------
/CNX type

* change your connection type to a new one (type).
  type must be one of the following value:
    56Kbps, 33.6Kbps, 28.8Kbps, Satellite, ISDN, DSL, Cable, LAN(T1), LAN(T3)

  = precmd

--------------------------------------------------------------------------------
/EMAIL email

* change your email to a new one (email). 
  email can be empty but be careful, in this case, the space after EMAIL is
  mandatory.

  = precmd

--------------------------------------------------------------------------------
/SLOT number

* change the number of upload slots to a new one (number)
  number must be positive or null.
  Note: if the number of upload in progress is bigger than the new number, the
  client doesn't close any upload connection. If you want, you must kill them
  manually using /KILL

  = precmd

--------------------------------------------------------------------------------
/PORT number

* change the port number used by active mode.
  number must be between 1 (included) and 65535.

  While in active mode, modifying the com port can generated transfer error.
  Running transfers are not affected but if the client tries at the same time
  to established a connection with another client (you in active mode or the
  remote client in passive mode), your client may send a port which will be
  closed when the remote client want to use it. To avoid the problem, don't have
  queued transfer orders inside the client (see /XFER) when you do the /PORT
  command.

--------------------------------------------------------------------------------
/SHARE directory
/UNSHARE directory

* add/remove a directory from the list of shared directories.

--------------------------------------------------------------------------------
/LPATH directory

* change the download directory.

  WARNING: when a download is in progress and this command is used, if the 
  download is interrupted, when the download resumes, the file is put inside the
  new directory (and download restarts from the beginning if the file doesn't
  exist in this new directory).

  = precmd

--------------------------------------------------------------------------------
/OFFSET number

* artificially change the size of shared data. The given number (in bytes) is
  added to the size of really shared data.

  = precmd

--------------------------------------------------------------------------------
/IP host_ip

* Note: Only in active mode (not behind a firewall). Unused in passive mode.

  change the address you report to other client. It can be either an IP
  (xxx.yyy.zzz.aaa) or a FQDN (myhost.mydomain.com).

  = precmd

--------------------------------------------------------------------------------
/PASSIVE
/ACTIVE

* Switch into passive (/PASSIVE) or active (/ACTIVE) mode.

  In passive mode, some functions don't work:
    * it is impossible to do download/upload with another client in passive mode
    * multi hub search doesn't work.
  In active mode, you may encounter problem if you want to use the normal
  direct connect transfer port (412) and you are not root. You can bypass this 
  problem either using another port (-p when starting the client) or switching
  into passive mode.

  Note: in active mode, to do transfer, the client sends its IP. If you don't 
  define it, the client uses the IP of the network card used by the default
  route (thus, it should always work). You can manually override this setting on
  the fly using the command /IP (see above).

  Note: if you have started in passive mode (using -f), switching into active
  mode creates the communication socket used by active mode.

--------------------------------------------------------------------------------
/KILL id

* kill a running transfer (XFERR). id is the number identifying the transfer.
  You can obtain transfer id using /XFER command.

  Note: a not yet started transfer cannot be killed.

--------------------------------------------------------------------------------
/KILLKB string

* Remove the given queued keyboard command (CMDKB) from the queue. The string
  must be the exact command to remove. The string is the string of CMDKB message
  between the first | (after the start time) and the last | (which closes the
  CMDKB message).

/KILLKBN num

* Same as previous command but using the first number of the "CMDKB]" message.

--------------------------------------------------------------------------------
/ULIST
/ULIST_FORCE

* get the list of all users of the hub.
  The _FORCE version doesn't use DCTC user list cache but forces the client to
  retrieve the user list from the hub (and refresh its internal list).

--------------------------------------------------------------------------------
/UINFO nick

* get nick's information (description,email, amount of shared data).

--------------------------------------------------------------------------------
/AWAY
/HERE

* change your status. When away, you don't receive public chat message. You
  still receive private message.

  = precmd

--------------------------------------------------------------------------------
/QUIT

* quit the client. 

  Note: the client doesn't quit really until all transfer are over. However,
  after this order, you are deconnected from the hub and you can't enter new
  order on the command line.
  Note: you still receive messages generated by transfer thread(s) so, you are
  able to know how and when transfers end.

/FORCEQUIT

* same as /QUIT except the client doesn't want end of transfer thread(s) and 
  end immediatly.

--------------------------------------------------------------------------------
/DLON
/DLOFF

* enable or disable remote client download capability. If you use /DLOFF, nobody
  will be able to download from your client. Your client still reports the
  value you provide as number of free download slot but if someone tries to 
  start a download from you, the client will return a "no more slot" messages.

  = precmd

--------------------------------------------------------------------------------
/DEBUG

* switch between debug and normal mode.

  = precmd

--------------------------------------------------------------------------------
/LOG filename
/NOLOG

* enable or disable message logging. All messages generated by the client are 
  saved into the log file. Message format is exactly the same as the displayed
  message.

  = precmd

--------------------------------------------------------------------------------
/RECON

* First, you will never be able to call this function. This description is only
  here for people looking inside the source. When the client losts the hub 
  connection, it will internally send this command to force a reconnection.
  If the hub address is a FQDN, hub IP will be computed again. Thus, if the hub
  has a static FQDN but a dynamic IP, the client will be able to recontact it,
  even if its IP has changed.

  Note: this command is ignored if the hub connection is still here, else, a
  hub reconnection is tried.

--------------------------------------------------------------------------------
/HUBNAME

* Redisplay the name of the current hub.

--------------------------------------------------------------------------------
/LS nickname

* download and display the list of files shared by the user named 'nickname'.

--------------------------------------------------------------------------------
/ERRLOG filename
/NOERRLOG

* enable or disable logging of "ERR ]" messages. Even if this option is enabled,
  "ERR ]" messages remain logged into /LOG file (if also enabled).

  = precmd

--------------------------------------------------------------------------------
/DONE
/UNDONE

* enable or disable usage of the done/ directory. When enabled (/DONE), when a
  download ends, the received file is moved into a done/ directory located 
  inside the directory currently containing the received file.

  = precmd

--------------------------------------------------------------------------------
/PASSWD password

* specify a password to use when the hub wants one.
  When a password has been entered, it is automatically used again when the 
  client has to reconnect to the hub.

  = precmd

--------------------------------------------------------------------------------
/UBL num

* change the upload bandwidth limit to num x 512 bytes/s.

--------------------------------------------------------------------------------
/RESHARE

  refresh the shared file database. This command rebuilds the database to take
  into account added/removed files/directories.

--------------------------------------------------------------------------------
/REUINFO

  not very useful for the user, mainly used internally. Resent user information
  to the hub. For example, this command is called internally after the periodic
  /RESHARE.

--------------------------------------------------------------------------------
/RECOND num

* change the delay to wait after a hub connection loss before trying to esta-
  blish a new connection. num is a number of seconds. Min value is 30, max value
  is 1800. Default delay is 30 seconds.

  = precmd

--------------------------------------------------------------------------------
/REBUILD num

* change the delay between two rebuilding of the shared database. Default value
  is 900 seconds. Possibles values are 0 to disable auto-rebuilding or a value
  between 900 and 1966020 (~1365 days).

  = precmd

--------------------------------------------------------------------------------
/GDLNEW gdlid|filesize|filename

* create a new GDL having the given gdlid. the GDL size will be filesize and 
  its final name will be filename

--------------------------------------------------------------------------------
/GDLADD gdlid|nickname|remotefilename|remotefilesize

* add a new source (nickname/filename/filesize) to the given GDL (gdlid). If
  this source still exist, its filesize is update.

--------------------------------------------------------------------------------
/GDLEND gdlid

* delete the GDL having the given gdlid. All GDL sources are deleted, connection
  are closed and temporary files are erased.

--------------------------------------------------------------------------------
/GDLDEL gdlid|nickname|remotefilename

* remove the given source (nickname/filename) of the given GDL (gdlid). if this
  source downloads at the same time, its download is erased.

--------------------------------------------------------------------------------
/GDLAS+ gdlid|filetype|searchpattern

* add the given search pattern (nickname/filename) to the given GDL (gdlid).

--------------------------------------------------------------------------------
/GDLAS- gdlid|gasID

* remove the given search pattern (using it ID) to the given GDL (gdlid).

--------------------------------------------------------------------------------
/GDLQLST
/GDLLST

* display the (quick) list of GDL(s).

--------------------------------------------------------------------------------
/XDL|gdl_id|nickname|

* Don't use this command, it is used internally. This command is used by the GDL
  subsystem to try to start new transfer. In the worst case, you will just
  accidentally start a transfer.

--------------------------------------------------------------------------------
/GOTO hubaddress

* you can use this command to go to another hub without living the running
  client. The current hub connection is closed (if exist) and a new one is
  established.

  Note: the given hubaddress is NOT checked before closing hub connection. If
  the client fails to establish a new connection, it will retry later and later
  and so on...

--------------------------------------------------------------------------------
/GDLATTACH filename

* attach an unused GDL to this client. DCTC search for the given filename inside
  the GDL/ directory. If it exists and is unused (.lock is not locked), it tries
  to load the last known GDL status (.cmd file).

--------------------------------------------------------------------------------
/GDLDETACH gdlid

* detach a running GDL of this client. When DCTC terminates, internally, it does
  this to allow attachement later.

--------------------------------------------------------------------------------
/FOLLOWFORCE
/UNFOLLOWFORCE

* Use these command to toggle the follow_force_move value. This defines what the
  hub does when it receives a hub redirection (either go to the specified hub or
  disconnect and come back later).

  = precmd

--------------------------------------------------------------------------------
/DDL
/NODDL

* enable/disable direct download (capability to start a download from a remote
  client without hub help). Default: DDL is disabled.

  = precmd

