mIRC Homepage
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
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
  }
}
Just seen your post and haven't tested the code yet.
But thanks already. smile
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
Good idea wink
© mIRC Discussion Forums