|
|
Joined: Jul 2004
Posts: 40
Ameglian cow
|
OP
Ameglian cow
Joined: Jul 2004
Posts: 40 |
I cant work out what im doing wrong here, this should respond to Request Number* in a channel and check to see whether the file requested is on my hard drive. If it is, it should then send to the nick asking for it. Any help would be much appreciated ON *:LOAD: { set %workingincdir $sdir(c:\,Select directory where folders with rar files are) } ON *:TEXT:8Request number*:#incomplete: { if ($exists($findfile(%workingincdir,$10,5))) { msg #incomplete I have your file and am sending to you now dcc send $nick " $+ %workingincdir [ $+ $findfile(%workingincdir,$10,5) ] $+ " msg #incomplete !close Request Number $4 } else { haltdef } }
i script, therefore i am theres logic in there somewhere...
|
|
|
|
Joined: Dec 2002
Posts: 1,922
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 1,922 |
Can you give us some examples of what your channel visitors would type to request a file?
|
|
|
|
Joined: Dec 2002
Posts: 3,547
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 3,547 |
Yeah, I was actually wondering where $10 came from.
|
|
|
|
Joined: Jul 2004
Posts: 40
Ameglian cow
|
OP
Ameglian cow
Joined: Jul 2004
Posts: 40 |
Request number [ 12 ] added by nickname [ filename.rar / Original.FILE ]
I was counting [ and ] as a character.
i script, therefore i am theres logic in there somewhere...
|
|
|
|
Joined: Aug 2003
Posts: 1,831
Hoopy frood
|
Hoopy frood
Joined: Aug 2003
Posts: 1,831 |
Well first off, "$findfile(%workingincdir,$10,[color:red]5))) "[/color] is trying to find the fifth file by that name in that directory, which obviously can't exist. Also " $+ [color:green]%workingincdir [ $+ $findfile(%workingincdir,$10,[color:red]1)[/color] ] $+ "[/color] would become " X:\path\X\path\file.ext" on *:text:8Request number*:#incomplete:{
if $exists(%workingincdir $+ $10) {
msg $nick I have your file and am sending to you now
dcc send $nick %workingincdir $+ $10
msg # !close Request Number $4
}
}
|
|
|
|
Joined: Jul 2004
Posts: 40
Ameglian cow
|
OP
Ameglian cow
Joined: Jul 2004
Posts: 40 |
that works fine, however, what if i wanted it to search inside all subdirs as well? For that file, obviously.
i script, therefore i am theres logic in there somewhere...
|
|
|
|
Joined: Aug 2003
Posts: 1,831
Hoopy frood
|
Hoopy frood
Joined: Aug 2003
Posts: 1,831 |
on *:text:8Request number*:#incomplete:{
if $findfile(%workingincdir,$10,1) {
msg $nick I have your file and am sending to you now
dccsend $nick $v1
msg # !close Request Number $4
}
}
|
|
|
|
|
|