mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Nov 2003
Posts: 2
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

Joined: Dec 2002
Posts: 1,922
O
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
  }
}

Joined: Nov 2003
Posts: 2
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

Joined: Jan 2003
Posts: 2,523
Q
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
Joined: Dec 2002
Posts: 1,922
O
Hoopy frood
Offline
Hoopy frood
O
Joined: Dec 2002
Posts: 1,922
Good idea wink


Link Copied to Clipboard