mIRC Home    About    Download    Register    News    Help

Print Thread
#104714 08/12/04 01:29 AM
Joined: Dec 2004
Posts: 2
C
Bowl of petunias
OP Offline
Bowl of petunias
C
Joined: Dec 2004
Posts: 2
Hi there,

I'm doing a trigger script, so that when somebody types in !faq, they get a file DCC'd to them.

Only problem is, not everybody that uses the trigger has their DCC turned on or set up right.

Is there anyway I can get the DCC Send box to automatically close if the file doesn't get sent? I'd like to think there is some script command for this. I do know about SENDFAIL that can be used in the remote section, but I don't know what I would use to close the actual box.

Joined: Aug 2003
Posts: 1,831
I
Hoopy frood
Offline
Hoopy frood
I
Joined: Aug 2003
Posts: 1,831
This will close all send windows with the user, so you should fill the filename field in to have it trigger only on that file
Code:
on *:sendfail:[color:blue]filename.ext[/color]:close -s $nick

This one should close only a particular send that fails (haven't tried it)
Code:
on *:sendfail:*:{
  var %i = 1,%c = $send(-1).hwnd
  while $send($nick,%i).hwnd {
    if $v1 == %c { close -s $+ %i $nick }
    inc %i
  }
}

Joined: Dec 2004
Posts: 2
C
Bowl of petunias
OP Offline
Bowl of petunias
C
Joined: Dec 2004
Posts: 2
Thanks! The SendFail with the /close worked

This is much appreciated smile

Joined: Aug 2012
Posts: 59
Babel fish
Offline
Babel fish
Joined: Aug 2012
Posts: 59
This is a great example of an older message that holds up well even years later.

I was puzzled this morning trying to get /close to work on message windows from users who persist in sending me @commands in private chat windows. Below is the working example. Thanks to you guys for asking the question and actually showing a working example of /close.

Code:
on *:TEXT:@help:?:{ //msg $nick Why in the world are asking me for help in a private message?  Try it in the channel instead.
/close -m $+ %i $nick } 


Find Gamers, my player finder for tabletop RPGers and Wargamers.

Link Copied to Clipboard