rejetto forum

Ban

0 Members and 1 Guest are viewing this topic.

Offline MelkiyProd.

  • Occasional poster
  • *
    • Posts: 70
  • Languages: English, Русский, Українська.
    • View Profile
I create settings in the template. Need the code (button) to add the ban for ip address. Help me, plz.
« Last Edit: August 12, 2013, 10:39:41 PM by MelkiyProd. »


Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13523
    • View Profile
it's not easy.
there's no {.command.} for ban, so you have to change the HFS configuration, by using {.set ini.}

the string is in this form
ban-list=120.113.14.1#comment|22.242.21.2#other comment|

here you can see 2 ban rules, for 2 addresses.
If you are not a programmer this will be hard to get


Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13523
    • View Profile
to manipulate an existing setting, you'll have to read the value, not just write it.
So, a side {.set ini.} i introduced {.get ini.} in version #285


Offline MelkiyProd.

  • Occasional poster
  • *
    • Posts: 70
  • Languages: English, Русский, Українська.
    • View Profile
And how to display the list of banned accounts?  :)


Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13523
    • View Profile
display? where? where are you stuck?


Offline MelkiyProd.

  • Occasional poster
  • *
    • Posts: 70
  • Languages: English, Русский, Українська.
    • View Profile
I want to create a ban list in the template to see whom I added to the ban list  :) Is it possible?

P.S. I created the button for ban
« Last Edit: August 25, 2013, 10:39:27 AM by MelkiyProd. »


Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13523
    • View Profile
yes, it's possible. Since it's not native, you need programming skills.
read "ban-list", split it on the "|" character, then split again on the "#" character. Loop over them, just output the pieces.


Offline MelkiyProd.

  • Occasional poster
  • *
    • Posts: 70
  • Languages: English, Русский, Українська.
    • View Profile