View Single Post
Old 03-19-2004, 11:32 AM  
Mouton
Posse Member
 
Join Date: Dec 2002
Posts: 1,956
Default

just batch files that fixes what ioSharedDb doesn't do would be enough...
ie on adduser, add the user to the current group + change it's ratio to x.
on gadduser, add the user to the specified group + change it's ratio to x.

We can't use FTP_Custom_commands since this would be execute before the actual g/adduser command... So we need to use the post SITE event...

Using a batch file, the ratio and number of logins that ioSharedDB doesn't set can be fixed. The problem is that I don't know a way to change the group using !commands in an external script...
An itcl would probably do a better job.

Here's what i use (note: the !chgrp doesn't work):
Quote:
@echo off
echo !buffer off

IF %2==GADDUSER GOTO GADDUSER
IF %2==gadduser GOTO GADDUSER
IF %2==ADDUSER GOTO ADDUSER
IF %2==adduser GOTO ADDUSER
GOTO END

:GADDUSER
set adduser=%4
GOTO CHANGE

:ADDUSER
set adduser=%3
echo !chgrp %adduser% %group%
echo 200-User '%adduser%' was added to group '%group%'
GOTO CHANGE

:CHANGE
set addratio=3
set addlogins=2

echo !change %adduser% logins %addlogins% FTP
echo 200-User '%adduser%' was given %addlogins% FTP login slots.
echo !change %adduser% ratio %addratio% section 0
echo 200-User '%adduser%' ratio was changed to 1:%addratio% in section 0.

:END
echo !buffer on
Mouton is offline   Reply With Quote