Old 12-03-2010, 04:05 AM   #1
joppiesaus
Junior Member
 
Join Date: Jan 2010
Posts: 6
Default ioDiz: output diz file on entering dir

This itcl script outputs the diz file on entering a dir which contains a file_id.diz.

Code:
# this shows the diz file on list
# put the following in ioftpd.ini:
# [FTP_Post-Command_Events]
# list = TCL ..\scripts\ioDiz\iodiz.itcl
proc show_diz {} {
	global path
	set path [string map {\\ /} $path]
	if {![file exists "$path/file_id.diz"]} {return}
	set fileid [open "$path/file_id.diz" r]
	set db [read $fileid]
	close $fileid
	foreach lined [split $db \n] {
		if {![string equal "" $lined]} {
			iputs -nobuffer "150-$lined"
		}
	}
}
show_diz
Ideally it should first check the path if its /0day or something similair but this just checks all dirs.
joppiesaus is offline   Reply With Quote
Reply

Tags
diz, file, path, set, [string

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:47 PM.

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