mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Aug 2003
Posts: 318
P
Pan-dimensional mouse
OP Offline
Pan-dimensional mouse
P
Joined: Aug 2003
Posts: 318
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.

Joined: Dec 2002
Posts: 5,408
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2002
Posts: 5,408
Thanks this issue has been fixed for the next version.

Joined: Aug 2003
Posts: 318
P
Pan-dimensional mouse
OP Offline
Pan-dimensional mouse
P
Joined: Aug 2003
Posts: 318
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

Joined: Jan 2004
Posts: 2,127
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2004
Posts: 2,127
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.
Joined: Aug 2003
Posts: 318
P
Pan-dimensional mouse
OP Offline
Pan-dimensional mouse
P
Joined: Aug 2003
Posts: 318
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.
Joined: Dec 2002
Posts: 5,408
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2002
Posts: 5,408
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.


Link Copied to Clipboard