ULX

Author Topic: How does the ULX ban time work?  (Read 4964 times)

0 Members and 1 Guest are viewing this topic.

Offline Jet

  • Newbie
  • *
  • Posts: 1
  • Karma: 0
How does the ULX ban time work?
« on: October 06, 2014, 07:58:57 PM »
I looked through the code and found where it records the ban and figures out when to unban them etc but I'm just wondering how ULX checks/knows if it's time to unban them. I've done some googling and haven't found anything but please let me know if I've missed something. Thanks.

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: How does the ULX ban time work?
« Reply #1 on: October 06, 2014, 08:27:22 PM »
If I recall, and quick review of ULib.addBan, all we do is allow the server to update after it starts, then start tracking it's own temporary bans.
That is, Source/Gmod doesn't track temp bans across sessions (at least, it didn't used to, perhaps it does now, it's been years since I last researched)
So, you temp ban someone for 20 minutes, server crashes, restarts 10 minutes later (not a map change, I think it tracks across that), without ULib or other admin mod tracking it, the banned user could then join.
All we do is write additional ban info, including the expiration time, to /data/ulib/bans.
The server does it's own time tracking.
If the server restarts, while execing the normal permanent banned_user.cfg and banned_ip.cfg, we then load our bans.txt and 'reban' those that have not expired.
The normal source engine then does the tracking from there.

Then again, my recollection may be off.
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

An Error Has Occurred!

array_keys(): Argument #1 ($array) must be of type array, null given