FlashFXP Forums

FlashFXP Forums (https://oss.azurewebsites.net/forum/)
-   ! Requests (https://oss.azurewebsites.net/forum/ioftpd/ioftpd/scripting/-requests/)
-   -   [Filled] Custom site command, SITE GIVEACCESS (https://oss.azurewebsites.net/forum/ioftpd/ioftpd/scripting/-requests/9244-filled-custom-site-command-site.html)

BobbyBonilla 11-02-2004 01:27 PM

How to create a custom site command?
 
Hello,

I would like to implement the following custom site command:

site giveaccess <user>

The command is supposed to execute the following site command:

SITE CHANGE <user> VFSFILE ..\etc\private.vfs

Thanx a lot in advance for your help, Bobby.

jeza 11-02-2004 02:27 PM

Code:

#include <stdio>

int main (int argc, char **argv)
{
  if ( argc == 2 )
  {
    printf("Changing '%s' VFSFILE to '..\\etc\\private.vfs'\n",argv[1]);
    printf("!change %s vfsfile ..\\etc\\private.vfs\n",argv[1]);
  }
 
  return 0;
}


BobbyBonilla 11-02-2004 02:31 PM

and where do I add this?

jeza 11-02-2004 02:50 PM

copy code to file and save as giveaccess.cpp

compile with borland c++ compiler
http://www.borland.com/products/down...cbuilder.html#

Code:

bcc32.exe -w- -O2 -Ipath.to\BCC55\Include -Lpath.to\BCC55\Lib -npath\to\where\u\wanna\this\exe -egiveaccess.exe path\to\giveaccess.cpp
in ioftpd.ini add command
Code:

givaaccess = exec path\to\giveaccess.exe
and
permission
Code:

giveacces = 1

jeza 11-02-2004 02:55 PM

download the exe file here

http://www.ioftpd.com/scripts/script.php?id=148

neoxed 11-02-2004 04:54 PM

You could have just used a simple batch file...

Code:

@ECHO OFF
ECHO Changing '%1' VFSFILE to '..\\etc\\private.vfs'
ECHO !change %1 vfsfile ..\\etc\\private.vfs
EXIT 0

BobbyBonilla, please post in the correct forum category; this is not a question specific to registered ioFTPD versions.

BobbyBonilla 11-03-2004 04:49 AM

Sorry NeoXed for posting in the wrong section. Will try to do it right next time :>

Many thanks to both of u for your help.

Bye, Bobby.

dink-puller 11-05-2004 02:30 AM

Quote:

Originally posted by NeoXed
You could have just used a simple batch file...

Code:

ECHO !change %1 vfsfile ..\\etc\\private.vfs
EXIT 0


Is this how all ioFTPD commands can be executed in a batch file?
And...can the custom commands be added to a batch file too this same way, i.e. ECHO !<command> <params>, or just native ioftpd commands?

neoxed 11-05-2004 03:18 AM

The !change command provides the same functionality for scripts, as the SITE CHANGE <target> <option> <parameters> command does for users.

dink-puller 06-21-2006 07:48 AM

Can any site command custom or otherwise, be used in a batch file this way?


All times are GMT -5. The time now is 04:02 AM.

Powered by vBulletin® Version 3.8.11 Alpha 3
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
Parts of this site powered by vBulletin Mods & Addons from DragonByte Technologies Ltd. (Details)