/system script add name="new_user" source={
:foreach a in [/ip hotspot active find] do={
:if ([/ip hotspot active get $a uptime]<1m) do={
/tool e-mail send \
to=phalla.ccmt@gmail.com \
subject=("'" . [/ip hotspot active get $a user] . "' logged in") \
body=("User:" . [/ip hotspot active get $a user] . " Date:" . \
[/system clock get time] . " IP address:" . \
[/ip hotspot active get $a address] . " MAC address:" . \
[/ip hotspot active get $a mac-address] . " Session timeout:" . \
[/ip hotspot active get $a session-timeout])
}
}
}
No comments:
Post a Comment