setpwd <idx> <dir>
changes the directory of a file system user, in exactly the same way as a 'cd' command would (ie, the directory can be specified relative or absolute)
returns: nothinggetpwd <idx>
returns: the current directory of a file system usergetfiles <dir>
returns: list of files in the directory given; the directory is relative to dcc-pathgetdirs <dir>
returns: list of subdirectories in the directory given; the directory is relative to dcc-pathfilesend <idx> <filename> [ircnick]
like dccsend, except it operates for a current filesystem user, and the filename is assumed to be a relative path from that user's current directory
returns: "0" on failure; "1" on success (either an immediate send or a queued send)setdesc <dir> <file> <desc>
sets the description for a file in a file system directory; the directory is relative to the dcc-path
returns: nothinggetdesc <dir> <file>
returns: the description for a file in the file system, if one existssetowner <dir> <file> <handle>
changes the owner for a file in the file system; the directory is relative to the dcc-path
returns: nothinggetowner <dir> <file>
returns: the owner of a file in the file systemsetlink <dir> <file> <link>
creates or changes a linked file (a file that actually exists on another bot); the directory is relative to dcc-path returns: nothinggetlink <dir> <file>
returns: the link for a linked file, if it existsgetfileq <handle>
returns: list of files queued by someone; each item in the list will be a sublist with two elements: nickname the file is being sent to, and the filenamesetuploads <handle> <#uploads> <size-in-k>
sets a user's statistics on the number of files uploaded and the total kilobytes uploaded
returns: nothinggetuploads <handle>
returns: list containing upload statistics for a user: the first element is the number of files uploaded; the second element is the total kilobytes uploadedsetdnloads <handle> <#dnloads> <size-in-k>
like setuploads, but sets the download statistics
returns: nothinggetdnloads <handle>
returns: list containing download statistics, in the same format as getuploadsmkdir <directory> [required-flags]
creates a directory in the files system, only users with the required flags may access
returns:
0 on success
1 on can't create directory
2 on directory exists but is not a directory
rmdir <directory>
removes a directory from the file system.
returns: 0 on success, 1 on failuremv <file> <destination>
moves the file from it's source to the given destination, file can also be a mask, eg /incoming/* provided the destination is a directory
returns: number of files copied on success or negative numbers to indicate errors: -1 = invalid source file, -2 = invalid dest -3 = you're trying to copy onto itself (duh!) -4 = no matches foundcp <file> <destination>
exactly the same as mv except it leaves the original file there as well
returns: same as mvgetflags <dir>
returns: the flags required to access this directorysetflags <dir> [flags]
sets the flags required to access the directory
returns: 0 on success, -1 on failure
files-path
where the filesys is storedincoming-path
where to upload files if upload-to-cd = 0filedb-path
where to store filedb's if they can't be stored in the directories themselvesmax-filesize
maximum file transfer size in kbytesmax-file-users
maximum number of users allowed in the file areaupload-to-pwd
allow users to upload to their current directory?
Two user entries relating to filesytem transfers are also added, FSTAT and DCCDIR to TCL users (USERENTRY_FSTAT and USERENTRY_DCCDIR to C programmers, see filesys.h for the struct for fstat, dccdir is a normal unshared string). The values can be set/read using get/setusergetuser <handle> FSTAT [u/d]
returns: the users FSTAT entry, if u or d is specified, only the uploads or downloads are returned, otherwise uploads and downloads are returned, all are in the form 'files kbytes'setuser <handle> FSTAT <u/d> [files [kbytes]]
sets a users FSTAT entry (u = uploads, d = downloads), settings default to 0.getuser <handle> DCCDIR
returns: the user's currently saved dcc directorysetuser <handle> DCCDIR <dir>
sets a new value for a users dcc directory
A binding table is also provided for the file system area commands: (Note: everything is passed through the FILT binding table first)bind fil <flags> <command> <proc>
calls TCL: (tcl callback provided)Used for commands from a file area user. the command is the first word and everything else is the args string. the idx is valid until the user disconnects.
procname <handle> <idx> <args>calls C:
return: 1 to make the file get logged as:
#handle# files: command
args[1] = & (int) idx;
args[2] = char * args;