From 1546a41fb96f1d8715c3a8bf5145f7b1e413c20c Mon Sep 17 00:00:00 2001 From: Massimo Melina Date: Thu, 28 May 2020 14:55:10 +0200 Subject: [PATCH] fix: right click on the log didn't recognize IPv6 addresses to offer 'ban this address' --- main.pas | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/main.pas b/main.pas index f180383..7122f79 100644 --- a/main.pas +++ b/main.pas @@ -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