Kick Duplicate hotspot users

i have 3 hotspot on a mikrotik and all of them connecting to radius server (windows 2008) and i cannot use shared users because it will assign to local users only and im not using usermanager as well.
is there any script to run and kick duplicate users in 2 hotspot only ? because the third hotpost is multisession

i found this script, but i have 3 hotspot and i need to kick duplicate users only for 2 hotspot, the users of thid hotspot can login more than one time
how can i check the hotspot name this script??


:local uname $user;
:local usercount 0;
:local usertime “00:00:00”;
:local kickable;
:local maxuser 2;

:if (
:foreach i in=[/ip hotspot active find user=$uname] do= {
:local curup [/ip hotspot active get $i uptime];
:if ( $curup > $usertime ) do={
:set usertime $curup;
:set kickable $i;
}
:set usercount ($usercount+1);
}
:if ($usercount >= $maxuser) do={
:log info “Login user: $uname ($usercount/$maxuser) - Oldest $usertime will be logout!”;
/ip hotspot active remove numbers=$kickable;
} else {
:log info “Login user: $uname ($usercount/$maxuser)”;
}

At the very first step, filter out the users that are not on the 3rd hotspot server, i.e. replace

:foreach i in=[/ip hotspot active find user=$uname] do= {

with

:foreach i in=[/ip hotspot active find user=$uname && server!=hotspot3] do= {

thank you so much, it’s work perfect now.