mIRC Home    About    Download    Register    News    Help

Print Thread
DCC Send Autoget works only for 1st trust entry #265812 28/07/19 06:05 PM
Joined: Aug 2003
Posts: 240
P
Protopia Offline OP
Fjord artisan
OP Offline
Fjord artisan
P
Joined: Aug 2003
Posts: 240
As far as I can tell, Autoget of a file from trusted nicks only works when the relevant trust entry is the first in the trust list (which is shown alphabetically). If it is the only entry or if there are entries after it in the list, then autoget works fine.

To recreate:

1. Set Autoget for trusted users and show dialog for untrusted users.
2. Add a single entry for sending nick and have the file sent. It should auto accept.
3. Add a second entry "zzzzzz" which should appear below the above entry. Have the file sent again. It should auto accept.
4. Add a fourth entry "aaaaa" which should appear above the first nick. Have the file sent again. The file accept/ignore/cancel dialog will be shown.

Re: DCC Send Autoget works only for 1st trust entry [Re: Protopia] #265815 28/07/19 09:01 PM
Joined: Dec 2002
Posts: 4,563
Khaled Offline
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2002
Posts: 4,563
Thanks this issue has been fixed for the next version.

Re: DCC Send Autoget works only for 1st trust entry [Re: Khaled] #265816 29/07/19 10:52 AM
Joined: Aug 2003
Posts: 240
P
Protopia Offline OP
Fjord artisan
OP Offline
Fjord artisan
P
Joined: Aug 2003
Posts: 240
Khaled - As usual an extremely prompt response. Thank you.

Now I have to decide what to do in my script for anyone using 7.57 or below. I wonder if there is a workaround perchance?

1. Can you confirm whether my description of the bug is correct - that autoget only works for the first in the list?

2. It looks like using *!name@address rather than nick!name@address will put a temporary trust first in the list. I will see whether this mitigates this issue.

Thanks again.

P

Re: DCC Send Autoget works only for 1st trust entry [Re: Protopia] #265818 29/07/19 02:41 PM
Joined: Jan 2004
Posts: 1,202
maroon Offline
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2004
Posts: 1,202
You could test other versions to see which are actually affected. Surely in the past it's worked for more than 1 nick at a time. For the versions affected, a workaround that *should* work is to put the trusted people into a users list, then during the :event: where the autoget should happen, you could force it to be auto for people on the $ulist. For the else condition, you could either do-nothing or force it to be 'ask'. I think you can use $address during these events instead of mask 5.

Code
ON *:DCCSERVER:send:do_i_trust_this_nick
ctcp *:dcc send *:?:do_i_trust_this_nick

alias do_i_trust_this_nick {
if ($ulist($address($nick,5),trusted,1) {
if ($sreq != auto) { var %a $v1 | .!sreq auto | .timer 1 0 /.!sreq %a }
  }
else {
  if ($sreq == auto) { .!sreq ask | .timer 1 0 /.!sreq auto }
     }
}


Edit: And of course, to trust just a nick not their address, adding nick!*@* to the users list.

Last edited by maroon; 29/07/19 02:42 PM.
Re: DCC Send Autoget works only for 1st trust entry [Re: Protopia] #265820 29/07/19 03:19 PM
Joined: Aug 2003
Posts: 240
P
Protopia Offline OP
Fjord artisan
OP Offline
Fjord artisan
P
Joined: Aug 2003
Posts: 240
When I add the trust manually using the DCC Options dialogue, it puts it first and the DCC does autoget. When I apply the trust programmatically, using /dcc trust the autoget doesn't work. I have tested it by examining the sequence using $trust and this is the case.

I guess this is not a problem once the above fix is in place. In the mean time I have coded a workaround by adding a new trust and then removing all the previous trusts from the beginning of the list and putting them back on at the end of the list - the net result is that the new one is now the first in the list. :-) And it seems to work.

Last edited by Protopia; 29/07/19 03:20 PM.
Re: DCC Send Autoget works only for 1st trust entry [Re: Protopia] #265824 31/07/19 12:23 PM
Joined: Dec 2002
Posts: 4,563
Khaled Offline
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2002
Posts: 4,563
Quote
1. Can you confirm whether my description of the bug is correct - that autoget only works for the first in the list?

Yes, the address would need to be the first item in the list.