General > Developers Corner

How does the ULX ban time work?

(1/2) > >>

Jet:
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.

JamminR:
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.

An Error Has Occurred!

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

[0] Board index

Go to full version