Lock hotspot user to host-name

Since there is a lot MAC changing programs used along with MAC-spoofing programs to hack the users in the hotspot, here is an idea to decrease the effects of that by locking the user logging in to its host-name (the name of his device which is shown at ip>dhcp-server>leases).
we add this script at
ip>hotspot>user profile and add it to the required profiles at script on login
here is the script
{
:local a $address
:local h [/ip dhcp-server lease get value-name=host-name [find active-address=$a]]
:local comm [ /ip hotspot user get value-name=comment [find name=$user]]
:local f [:len [find $comm “$@”]]
:if ($comm=“” || $f=“0” ) do={
/ip hotspot user set comment=“$h$@$comm” [find name=“$user”]
} else={
:set comm [:pick $comm 0 [find $comm “$@”]]}
:if ($comm!=$h && $f!=0) do={
/ip hotspot active remove [find user=$username]}
}

Thank’s continue