fix: right click on the log didn't recognize IPv6 addresses to offer 'ban this address'

This commit is contained in:
Massimo Melina 2020-05-28 14:55:10 +02:00
parent 75d3d8e5e1
commit 1546a41fb9

View File

@ -11259,14 +11259,10 @@ result:='';
pt:=pointToCharPoint(logBox, logRightClick);
if pt.x < 0 then
pt:=logbox.caretpos;
if pt.y >= logbox.lines.count then exit;
if pt.y >= logbox.lines.count then
exit;
s:=logbox.lines[pt.y];
if pt.x > length(s) then exit;
i:=pt.x;
while (i > 1) and (s[i] <> ' ') do dec(i);
inc(i);
s:=copy(s,i, posEx(' ',s,i));
s:=trim(getTill(':',getTill('@',s)));
s:=reGet(s, '^\S+ +(\S+@)?(\S+):\d+ ', 2);
if checkAddressSyntax(s,FALSE) then
result:=s;
end; // ipPointedInLog