mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Apr 2004
Posts: 73
Z
Babel fish
OP Offline
Babel fish
Z
Joined: Apr 2004
Posts: 73
Hello,

When I checked the box for "On completion: close get window" (Options -> DCC -> Options), It seems to incorrectly work when there is more than one get from the same nickname. If this is in effect, mIRC closes all of the get windows from the sending nickname when one of the files completes. For example, I am receiving 2 pictures from NicknamE12, one of them finishes, and mIRC closes both of the get windows, even though the other one is still downloading.

While I am thinking about it, I would like to see mIRC be able to have more features for /close. Perhaps a switch that will only close a send/get window if it is done, and for a filename parameter. That could be used like so:

/close -gC NicknamE12 - For closing all completed gets from NicknamE12
/close -g NicknamE12 pic00078.jpeg - For closing only pic00078.jpeg from NicknamE12
/close -g NicknamE12 $filename - For closing only the just received file from NicknamE12 on an on FILERCVD event.

Thanks-

-Zelda4ever

Joined: Nov 2003
Posts: 2,327
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Nov 2003
Posts: 2,327
For now you could use:

Code:
alias close2 {
  if ($1 == -g1) { 
    var %complete = 1
    tokenize 32 $2-
  }
  var %i = 1
  while (%i <= $get($1,0)) {
    if (%complete) && ($get($1,%i).done) { 
      if (($2 != $null) && ($get($1,%i).file == $2-)) || ($2 == $null) { window -c "Get $1 $get($1,%i).file $+ " }
    }
    elseif (%complete == $null) { 
      if (($2 != $null) && ($get($1,%i).file == $2-)) || ($2 == $null) { window -c "Get $1 $get($1,%i).file $+ " }
    }
    inc %i
  }
}


/close2 [-g1] <nick> [file]

Untested.


New username: hixxy
Joined: Apr 2004
Posts: 73
Z
Babel fish
OP Offline
Babel fish
Z
Joined: Apr 2004
Posts: 73
Thanks for the workaround tidy.

-Zelda4ever

Joined: Aug 2003
Posts: 1,831
I
Hoopy frood
Offline
Hoopy frood
I
Joined: Aug 2003
Posts: 1,831
Quote:
For closing only the just received file from NicknamE12 on an on FILERCVD event

Code:
on *:filercvd:*:{
  var %i = 1,%a = $get(-1).hwnd
  while $get($nick,%i).hwnd {
    if $v1 == %a { close -g $+ %i $nick | return }
    inc %i
  }
}

Joined: Sep 2003
Posts: 4,230
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
I cant reproduce this using 6.16 on Win2ks.


I wounder if these files were being downloaded from a xdcc bot using klipper, I know that script has a fault in it, that they dont seem willing to acknowledge or fix.


If it is you can go into xdccklipper.mrc search for .timer 1 0 close -g $nick and remark the line.
Its in this routine.

on *:FILERCVD:*: {
... stuff here ...
.timer 1 0 close -g $nick
.... stuff here ...

Joined: Nov 2004
Posts: 148
D
Vogon poet
Offline
Vogon poet
D
Joined: Nov 2004
Posts: 148
DaveC, What exactly do you mean?

I also wandered on closing 1 transfer window, and I tought of using close -g $nick

What exactly do you meant my "remark"

Joined: Sep 2003
Posts: 4,230
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
I ment Xdccklipper assumes you cant get more than one file at a time from any one xdccbot so when the transfer completes, it uses a command .timer 1 0 close -g $nick to close the dcc get window, this closes ALL dcc gets from $nick, which isnt what you want if u have a second one going. It uses a .timer 1 0 assumedly to prevent problems with other scripts also tripping on the same event and it has closed the dcc get window(s) already, and they the other scripts cant deal with the fact a dcc finished but there isnt a window or $get() for it.

Instead of using close -g $nick try using window -c "Get $nick $nopath($filename) $+ "

find...
.timer 1 0 close -g $nick
remark below to...
;.timer 1 0 close -g $nick

Joined: Nov 2004
Posts: 148
D
Vogon poet
Offline
Vogon poet
D
Joined: Nov 2004
Posts: 148
All right then, at least I know what you meant... smile

I downloaded and looked on the code of xdccklipper, and from what I have seen, it will not let you request more than 1 file from the same xdccbot (I checked the On Input).

If a tranfer does't apear in the status window of the addon then it doesn't close the transfer window on complete.



I went to thier forum to search why they did what the did, and I found that it is because when a xdccbot sends you a file, there is no way of telling which pack is actualy sending (in case the script would support more then 1 transfer from that bot).
When updating the script status window about the information of download speed atc, it will also not know to which transfer window belongs to which pack, so the information will not be correct.

I'm realy impressed though that users here knows a lots about xdccklipper even though this forum doesn't allow talking/reffering to those kind of scripts :tongue: wink

I'll send an email to them with your suggestion to fix the bug.
I didn't know that you can even do window -c "Get $nick $nopath($filename) $+ " ....... I found something new every day grin


Link Copied to Clipboard