ivanalayan15 / JuanFi

Juanfi is an open source system for coinslot integration for mikrotik hotspot
Apache License 2.0
146 stars 113 forks source link

Update README.md for onLogin script to fix 0 validity issues ( final ) . #142

Closed edmarlozada closed 1 year ago

edmarlozada commented 1 year ago

We found some issues with validity.

  1. if validity = 0.
  2. if validity < user-limit-uptime. both the #add-user and #extend-user are affected. Solution:
    • on #add-user :if ($iUsrTime<$iTimeMin) do={ :set iTimeInt ($iTimeMin+$iUsrTime); };
    • on #extend-user :if ($iTimeInt<$iTimeMin) do={ :set iTimeInt ($iTimeMin+$iUsrTime); }
ivanalayan15 commented 1 year ago

if validity = 0

do we still need to create scheduler if no validity?

ivanalayan15 commented 1 year ago

nevermind i got the logic already, we have replace the on logout script to remove the deletion of data of user in data folder hence we need the scheduler always to be created otherwise the data would not be deleted if user expired time time.