Go Back   FlashFXP Forums > > > >

! Requests Need a script or some sort of cool .bat file ? Ask here!

Reply
 
Thread Tools Rate Thread Display Modes
Old 03-19-2004, 09:22 AM   #1
peep
Senior Member
FlashFXP Scripter
ioFTPD Foundation User
 
Join Date: Sep 2003
Posts: 132
Exclamation [REQ] Temporary Fix for ioShareDB Issues

Since ioShareDB apparently is discontinued (which btw is a pity, it was the start of something good) and since ioBv20 will be supporting such modules, we have to start working with what we've got. I'm putting a request for a couple of batchfiles that would make using ioShareDB a bit faster..


Now this is just to make adding users easier and faster..

gaddusers.bat
on: site grpadduser group1 user1 password1 ident@ip

exec site grpadd group1
if "500 group1: Group already exists."
goto adduser
if "200 grpadd Command successful."
goto adduser

:adduser
exec site adduser user1 password1 ident@ip
if "200 adduser Command successful."
goto chgrp

:chgrp
exec site chgrp user1 group1
if "200- User 'user1' has been successfully added to 'group1' group.
200 chgrp Command successful."
goto change

:change
exec site change user1 ratio 3
exec site change user1 logins 2


could when finished also echo all what's been done..

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


addmember.bat (for affils)

Using ioShareDB also makes life quite messy for the affils. When a groupadmin adds a new member, the member first of all is added with leech and secondly is added to group 'null', which then would have to be changed by an op.

Anyone wanna suggest how such an algoritm would look like? Or perhaps someone allready has made such a .bat/.exe? *bump*

peep is offline   Reply With Quote
Old 03-19-2004, 11:32 AM   #2
Mouton
Posse Member
Ultimate Scripter
ioFTPD Administrator
 
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
Old 03-19-2004, 01:09 PM   #3
peep
Senior Member
FlashFXP Scripter
ioFTPD Foundation User
 
Join Date: Sep 2003
Posts: 132
Default

Ok great! Anyone wanna fill in on the chgrp issue? d1, you around and might be able to help?
peep is offline   Reply With Quote
Reply

Tags
adduser, exec, group1, site, user1

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump


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

Parts of this site powered by vBulletin Mods & Addons from DragonByte Technologies Ltd. (Details)