PDA

View Full Version : [Fixed] MP3 autonuke error


oldhouse
09-14-2005, 08:43 AM
I get this error when enabling autonuke for mp3:

--------------------------------------------------09-14-2005 15:40:23 "C:\ioFTPD\scripts\ioBanana\ioAUTONUKE.itcl" terminated abnormally
--------------------------- ErrorInfo ----------------------------
can't read "relname": no such variable
while executing
"string match -nocase $relname [lindex $rule 0]"
(procedure "ismp3" line 7)
invoked from within
"$command "$sec" "$release" "0""
(procedure "anukecheck" line 40)
invoked from within
"anukecheck "mp3" "ismp3" "ANUKEMP3""
(procedure "autonuke" line 7)
invoked from within
"autonuke"

Harm
09-14-2005, 01:39 PM
Hehe, it looks like I've stripped too much code from this one. Here is the complete proc ismp3.
proc ismp3 {section name multi} {
global anuke
if {$multi == 1} {set relname [lindex [split $name /] end-1]} else {set relname [lindex [split $name /] end]}
set mp3info [split [getio "$name" "mp3"] |]
if {[llength $mp3info]==0} {return 0}
set bitrate [lindex $mp3info 1]; set year [lindex $mp3info 7]
foreach rule $anuke(mp3,$section) {
if {[string match -nocase $relname [lindex $rule 0]] && $year >= [lindex $rule 1] && $bitrate >= [lindex $rule 2]} {
return ""
}
}
return "enforcing.our.mp3.rules"
}

yogi
09-17-2005, 08:36 AM
hmm ist dosent work? so i get this err msg


--------------------------- ErrorInfo ----------------------------
can't read "anuke(allowed,mp3)": no such element in array
while executing
"foreach group $anuke(allowed,$section) {
if {[string match -nocase "*-$group" $relname]} {return ""}
}"
(procedure "isallowed" line 4)
invoked from within
"$command "$sec" "$release" "0""
(procedure "anukecheck" line 40)
invoked from within
"anukecheck "allowed" "isallo09-17-2005 15:30:13 "z:\ioFTPD\scripts\ioBanana\ioAUTONUKE.itcl" terminated abnormally
--------------------------- ErrorInfo ----------------------------

Harm
09-17-2005, 12:44 PM
It does; your problem is a configuration error. You have enabled the "allowed groups only" check for the "mp3" section but you haven't specified the allowed groups.
set anuke(allowed,mp3) "GRP WHATEVER"