View Single Post
Old 08-19-2004, 06:13 AM  
bizniz
Banned
 
Join Date: Feb 2004
Posts: 19
Default

Code:
set chmod	755
set banned	{
"\?"
"\*"
"'"
" "
"`"
"!"
"%"
"\{"
"\}"
}
set folder [string range $args 4 end]
foreach ban $banned {
	if {[string match *$ban* $folder]} {
		regsub -all -- [subst -nocommands {[$ban]}] $folder {_} folder
	}
}
if {[set defpem [lindex [config read "VFS" "Default_Directory_Attributes"] 0]] == ""} {
	set defpem $chmod
}
catch {file mkdir $path/$folder}
catch {vfs write $path/$folder [resolve user $user] [resolve group $group] $defpem}
iputs "553 '[string range $args 4 end]' renamed to '$folder'"
global ioerror ; set ioerror 1
return 0
for some reason setting args on pre doesnt get passed to io, so fukit, try this.
bizniz is offline   Reply With Quote