RE: [Question] Temporary Ban
well i cant be bothered coding it but for anyone who can heres the easiest way i can think of:
1. Get current unix timestamp (Math.round(new Date().getTime() / 1000))
2. Add the specified "block time" to the timestamp
3. Store it somewhere along with the blocked persons email
4. Start a timer with the timestamp to unblock - the current timestamp
You also have to loop through and start all these timers on sign in to make sure they still work after messenger has been ended (and if the time has already passed on sign in, immediately unblock)
|