|
Response to chan typing
#106368
29/12/04 09:20 AM
|
Joined: Jul 2004
Posts: 40
dmmrs
OP
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...
|
|
|
Re: Response to chan typing
#106369
29/12/04 05:40 PM
|
Joined: Dec 2002
Posts: 1,922
Online
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?
|
|
|
Re: Response to chan typing
#106370
29/12/04 06:41 PM
|
Joined: Dec 2002
Posts: 3,547
SladeKraven
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 3,547 |
Yeah, I was actually wondering where $10 came from.
|
|
|
Re: Response to chan typing
#106371
30/12/04 12:01 AM
|
Joined: Jul 2004
Posts: 40
dmmrs
OP
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...
|
|
|
Re: Response to chan typing
#106372
30/12/04 10:19 AM
|
Joined: Aug 2003
Posts: 1,831
Iori
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
}
}
|
|
|
Re: Response to chan typing
#106373
31/12/04 10:37 AM
|
Joined: Jul 2004
Posts: 40
dmmrs
OP
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...
|
|
|
Re: Response to chan typing
#106374
31/12/04 04:54 PM
|
Joined: Aug 2003
Posts: 1,831
Iori
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
}
}
|
|
|
|
|
|