I need help to modify script below to work with dhcp leases ip .
Script :
[{
:global time [/system clock get date]
:global day [ :pick $time 4 6 ]
/ppp secret;
:foreach m in=[find]\
do={\
:global days value=[:tostr [/ppp secret get $m comment]];
:global max value=[:pick $days -1 [:find $days "day"]];
:if ($max = $day) do={/ppp secret set $m profile=cut}
/ip hotspot ip;
:foreach b in=[find]\
do={\
:global r value=[:tostr [/ip hot ip get $b comment]];
:global ma value=[:pick $r -1 [:find $r "day"]];
:global address [get $b address]
:if ($ma = $day) do={/ip firewall add add list=cut address=$address comment=$r}
}}}]