Author Topic: ban a user for a period  (Read 6337 times)

0 Members and 1 Guest are viewing this topic.

Offline kaler

  • Experienced poster
  • ***
  • Posts: 94
    • View Profile
ban a user for a period
« on: August 31, 2009, 02:46:26 PM »
i have a question...

is there a function to ban an user atomatic for a timeperiode?
« Last Edit: September 05, 2009, 04:28:26 PM by rejetto »

Offline Mars

  • Operator
  • Insane poster
  • *****
  • Posts: 1830
    • View Profile
ban a user after a period
« Reply #1 on: August 31, 2009, 03:07:44 PM »
you can use the time events and make a macro which can ban the user or disalow his account after a period ;)

Offline kaler

  • Experienced poster
  • ***
  • Posts: 94
    • View Profile
Re: ban a user after a period
« Reply #2 on: August 31, 2009, 03:35:35 PM »
yeah but i doesen't understand the event scripts...

when you want to explain it to me..?

Offline rejetto

  • Administrator
  • Insane programmer
  • *
  • Posts: 12859
    • View Profile
Re: ban a user after a period
« Reply #3 on: September 04, 2009, 03:47:11 PM »
in your post you say FOR a period, in the subject you say AFTER a period.
it's different ;)

ban for how long? some days?


Offline kaler

  • Experienced poster
  • ***
  • Posts: 94
    • View Profile
Re: ban a user after a period
« Reply #4 on: September 04, 2009, 04:08:15 PM »
jeah sorry

ban or enable=0 FOR 7 days...

is there a posibility to "unban" all users with one special %reason%???

That means, all ip adresses which are banned for 7 days with the reason of 'false' will be "unbanned" after 7 days???

Offline rejetto

  • Administrator
  • Insane programmer
  • *
  • Posts: 12859
    • View Profile
Re: ban a user after a period
« Reply #5 on: September 05, 2009, 04:23:34 PM »
you can, but it's not easy.

put the unban date in the account notes.
{.set account|NAME|notes key=unban={.time|yyyy-m-d|offset=7.}.}

from next version, leaving empty the NAME will make it work on the current account.

then in an event

Code: [Select]
[+request]
{.if|{.and
  |{.not|{.get account||enabled.}.}
  |{.{.time|yyyy-m-d.} = {.get account||notes key=unban.}.}
/and.}|{:
  {.set account||enabled=1.}
:}.}

this solution is UNTESTED :)
and will work only with next version, bearing the new {.get account.}

Offline kaler

  • Experienced poster
  • ***
  • Posts: 94
    • View Profile
Re: ban a user for a period
« Reply #6 on: September 06, 2009, 03:27:28 PM »
thank you, but i havn't test it yet...

ive an other question... is there the possibility to ban an IP from a special folder?

Offline rejetto

  • Administrator
  • Insane programmer
  • *
  • Posts: 12859
    • View Profile
Re: ban a user for a period
« Reply #7 on: September 16, 2009, 11:04:57 AM »
no.
but you can use diff template to stop showing the file list to some IPs, for that folder