PDA

View Full Version : Script's !comands help


Mouton
04-22-2003, 07:33 PM
#include <stdlib.h>
#include <stdio.h>

int _tmain(int argc, _TCHAR* argv[])
{
// Read environement variables
char *var = getenv("pwd");

// Those doesn't apply to itcl scripting btw... don't even try.

// !vfs:chattr <mode> "<path>" "<value>"
// mode 0 = create/change private dir permission; <value> is the vfs to which the symlink will point
// mode 1 = create symlink; <value> can be "-<user>", "=<group>", "<flag>" or any mix of those (space-separeted)
printf("!vfs:chattr 1 \"d:\\desktop\\ioFTPD\\test\" \"/ioFTPD/users\"\n");
printf("!vfs:chattr 1 \"d:\\desktop\\ioFTPD\\test\" \"\"\n"); // Link to root dir on site...
printf("!vfs:chattr 0 \"d:\\desktop\\ioFTPD\\test\" \"-ioFTPD\"\n");
printf("!vfs:chattr 0 \"d:\\desktop\\ioFTPD\\test\" \"=ioftpd\"\n");
printf("!vfs:chattr 0 \"d:\\desktop\\ioFTPD\\test\" \"M\"\n");

// Change userfile
// !change <user/group> <change cmd> <arg1> ... <argn>
// Same change cmds are available on SITE CHANGE ...
printf("!change darkone VFSFILE ..\\etc\\admin.vfs\n");
printf("!change darkone FLAGS +T\n");

// Change file or dir owner id or permissions (mode)
// !vfs:add <mode> <owner uid:owner gid> <file/path>
printf("!vfs:add 777 101:101 D:\\desktop\\ioFTPD\\test\n");

// Write in ioFTPD.log; date/time are automatically prefixed
// !putlog <text>
printf("!putlog 1, 2, 1, 2 test!\n");

/*
Not working cmds:
!buffer: disable/enable buffering; output goes directly to socket when disabled
!flush: flush buffer
!prefix: enable/disable output prefix
!newlines: removes \n char
!lock: lock a resource
!unlock: unlock a resource
*/

/*
Weird cmds (ie working, but no idea how to use!):
!detach <number>: set return of a script
!cwd <dir>: change active directory
*/
}