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 04-30-2005, 03:00 PM   #1
Hellraiser
Junior Member
 
Join Date: Apr 2005
Posts: 4
Default [REQ] User upload timeframe

Hello ppl,

I am interested in a script that will prevent a user from uploading within a certain timeframe. Can this be done with TCL? What say you?
Thanks
Hellraiser is offline   Reply With Quote
Old 04-30-2005, 08:28 PM   #2
deo
Banned
 
Join Date: Feb 2005
Posts: 46
Default

yes it can
deo is offline   Reply With Quote
Old 05-01-2005, 06:12 AM   #3
Hellraiser
Junior Member
 
Join Date: Apr 2005
Posts: 4
Default

Thanks Deo, but, can you show me how this can be done?
Hellraiser is offline   Reply With Quote
Old 05-01-2005, 07:21 AM   #4
deo
Banned
 
Join Date: Feb 2005
Posts: 46
Default

yes i can
deo is offline   Reply With Quote
Old 05-01-2005, 07:26 PM   #5
Hellraiser
Junior Member
 
Join Date: Apr 2005
Posts: 4
Default

So I see...
Hellraiser is offline   Reply With Quote
Old 05-04-2005, 10:55 AM   #6
Hellraiser
Junior Member
 
Join Date: Apr 2005
Posts: 4
Default

Howdy ppl,

I'm still looking for some decent help/tip.
Many thanks
Hellraiser is offline   Reply With Quote
Old 05-31-2005, 09:03 AM   #7
mentality
Junior Member
 
Join Date: May 2005
Posts: 14
Default

Code:
##[FTP_Pre-Command_Events]
##stor		= %TCL ..\scripts\timeframe.itcl %[$flags]

set timeframe		"16-20" ;# from "this hour-to this hour"
set exemptflags	"1 M G" ;# obvious

proc return_hour {} {return [clock format [clock seconds] -format %H]}

proc check_flags {flags exemptflags} {
	foreach flag $exemptflags {
		if {[string match *$flag* $flags]} {
			return 1
		}
	}
	return 0
}

proc check_time {hour timeframe} {
	if {$hour >= [lindex $timeframe 0] && $hour <= [lindex $timeframe 1]} {
		return 1
	}
	return 0
}

if {[check_flags [lindex $args 0] $exemptflags]} {
	return 0
} elseif {[check_time [return_hour] [split $timeframe -]]} {
	iputs "530 No uploading allowed between these hours '$timeframe'!"
	return 1
}
...something like that
mentality is offline   Reply With Quote
Reply

Tags
tcl, timeframe, upload, uploading, user

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Flash hangs during transfers slatts General Discussion 5 01-14-2005 07:50 PM
Any new version of FlashSFV possible ?? Partha Software 6 02-06-2004 09:48 PM


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

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