mIRC Home    About    Download    Register    News    Help

Print Thread
on FILERCVD event, but before transfer starts. #59540 08/11/03 08:00 PM
Joined: Nov 2003
Posts: 2
WhiteHorse Offline OP
Bowl of petunias
OP Offline
Bowl of petunias
Joined: Nov 2003
Posts: 2
I want to run a script that decides wether or not to accept a dcc get request.
In other words, that runs before the transfer truly starts. And not, only *after* it concludes as does the "on FILERCVD".

Anyone knows a way?
Tks in advance. grin

Re: on FILERCVD event, but before transfer starts. #59541 08/11/03 08:09 PM
Joined: Dec 2002
Posts: 1,922
O
Online Offline
Hoopy frood
Offline
Hoopy frood
O
Joined: Dec 2002
Posts: 1,922
Code:
Ctcp *:dcc send *:?:{
  if (we want $filename) {
    var %sreq = $sreq
    ; set mirc to automatically accept this file
    .sreq auto
    ; and immediately restore previous settings
    .timer 1 0 .sreq %sreq
  }
  else {
    ; reject the file (can also be /dcc reject)
    halt
  }
}

Re: on FILERCVD event, but before transfer starts. #59542 08/11/03 08:42 PM
Joined: Nov 2003
Posts: 2
WhiteHorse Offline OP
Bowl of petunias
OP Offline
Bowl of petunias
Joined: Nov 2003
Posts: 2
Just seen your post and haven't tested the code yet.
But thanks already. smile

Re: on FILERCVD event, but before transfer starts. #59543 08/11/03 08:59 PM
Joined: Jan 2003
Posts: 2,523
Q
qwerty Offline
Hoopy frood
Offline
Hoopy frood
Q
Joined: Jan 2003
Posts: 2,523
You can avoid the variable with something like this wink
Code:
  .timer 1 0 .sreq $sreq
  .sreq auto

Edit: ...unless you did it for the sake of understanding (to go with the comments). Oh well smile

Last edited by qwerty; 08/11/03 09:03 PM.

/.timerQ 1 0 echo /.timerQ 1 0 $timer(Q).com
Re: on FILERCVD event, but before transfer starts. #59544 08/11/03 09:28 PM
Joined: Dec 2002
Posts: 1,922
O
Online Offline
Hoopy frood
Offline
Hoopy frood
O
Joined: Dec 2002
Posts: 1,922
Good idea wink