mIRC Homepage

DCC Send Autoget works only for 1st trust entry

Posted By: Protopia

DCC Send Autoget works only for 1st trust entry - 28/07/19 06:05 PM

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.
Posted By: Khaled

Re: DCC Send Autoget works only for 1st trust entry - 28/07/19 09:01 PM

Thanks this issue has been fixed for the next version.
Posted By: Protopia

Re: DCC Send Autoget works only for 1st trust entry - 29/07/19 10:52 AM

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
Posted By: maroon

Re: DCC Send Autoget works only for 1st trust entry - 29/07/19 02:41 PM

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.
Posted By: Protopia

Re: DCC Send Autoget works only for 1st trust entry - 29/07/19 03:19 PM

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.
Posted By: Khaled

Re: DCC Send Autoget works only for 1st trust entry - 31/07/19 12:23 PM

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.
© 2019 mIRC Discussion Forums