Author Topic: Just want to verify how banning works with ULIB  (Read 1493 times)

0 Members and 1 Guest are viewing this topic.

Offline Storm

  • Full Member
  • ***
  • Posts: 220
  • Karma: 4
Just want to verify how banning works with ULIB
« on: March 21, 2014, 03:07:55 AM »
After searching the forum and gathering information can I just verify something about banning? I believe the actual ban is written to the banned_users.cfg file and a copy with details about the ban writes to ulib/bans.txt, but that is just an informative copy? So for example, if you were just to delete your banned_users.cfg and leave the bans.txt file no one would be banned? Is that correct? And if a MySql database writes ONLY to ulib/bans.txt as a backup (in case the db fails) and does not write to banned_user.cfg, then when the data base fails, the server will ban no one, is that correct? Thanks!
« Last Edit: March 21, 2014, 06:21:29 AM by Storm »

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: Just want to verify how banning works with ULIB
« Reply #1 on: March 21, 2014, 04:35:25 PM »
I believe the actual ban is written to the banned_users.cfg file?
If a permanent, yes.

and a copy with details about the ban writes to ulib/bans.txt, but that is just an informative copy?

Not just. Ulib stores temp bans there. Source/banned_user.cfg doesn't store temp bans across server sessions(restarts/crashes).

So for example, if you were just to delete your banned_users.cfg and leave the bans.txt file no one would be banned? Is that correct?
I'm reasonably sure you'd lose your permanent bans, temp bans would remain.

And if a MySql database writes ONLY to ulib/bans.txt as a backup (in case the db fails) and does not write to banned_user.cfg, then when the data base fails, the server will ban no one, is that correct?
Correct.
Other code shouldn't be writing to the file without 98% understanding of all the writing/code ULib uses to ban, addBan and refreshBan.
Code should be using Ulib.ban if a player object, or as would be most likely in a SQL database for steamids, Ulib.addBan if one wishes to tie into ULib's ban usage.

Thanks!

Welcome.
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming