Check if IP in certain address-list

Hi, I’m writing a script to redail my many pppoe clients,
I want to log current IP to an address-list then redail, if the new IP match any of the old IPs then redail again.
Now I can easily add IP to address-list with

:local OLDIP [/ip address get [find interface=$PPPoE] address];
/ip/firewall/address-list add list=old-ip address=$OLDIP;

But how can I check if new IP in the address-list?

Any help will be appreciated.

Ok, you need to change IP continuosly for spam?

Well, for unknown reasons some IPs are block by a game I played, so when I got the IP I need to redail so I can login.

Basically what I want to do is read the address-list, so can use IF to determine if it’s in the blocked range

:local CheckIP ([:toip $currentIP] in [:toip $Blocked-IP]);
:if ($CheckIP = true) do={ ##redail or something};