Author Topic: Making bans log to a new file while bans in the old file are still banned  (Read 1225 times)

0 Members and 1 Guest are viewing this topic.

Offline AvoxPaine

  • Newbie
  • *
  • Posts: 5
  • Karma: 1
So, essentially I need some help on whether or not this is possible and how I would go about doing it. My ban file is quite huge on my server. Precisely it's 432 kB. There are 2,315 people banned on my server currently and I really do not want to reset the bans. The last time the bans were wiped was exactly a year ago. Now, the server gets an immense amount of lag when banning someone, editing bans, and unbanning someone.  My guess for the reasoning of this is because of the bans file size and it having to continue writing and changing this 'large' file.

Anyways— I apologize if I should have described more of what I need help with in the first 'paragraph', I need to know if it's possible and how to go about making the bans write to a new file while still having all the previous bans in a separate file and them remaining banned. I apologize if that sounds like gibberish, but I'm not exactly sure how to describe it that well as I am just an amateur coder.

ULX and ULib versions:
ULX v3.73 & ULib v2.63
Gamemode:
DarkRP 2.7.0 (there was an update 10 days ago that I have no installed yet, but it retained the same version)

-- While making this thread I unbanned a singular person to screenshot the amount of lag that comes from doing anything with bans, and the server just straight up crashed.
Given it was 45/45, but the server has yet to crashed from any type of banning and unbanning until now, but this behaviour should not be happening in the first place.

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: Making bans log to a new file while bans in the old file are still banned
« Reply #1 on: December 02, 2017, 05:42:44 PM »
Source only allows one ban file in \garrysmod\cfg
That file may contain a few less bans as I believe it only stores permanent bans.
The Ulx bans file stores much more information, and, stores temporary bans across server sessions. The source ban file does not.

The only way to save you heartache and lag would be to move to a totally SQL based bans system, several discussions of which exist on this forum.
I believe there may be some releases in the releases section of the forum too, but I'm not swearing to it, nor will I switch tabs and search for you.
Just try searching for "SQL ban" and or "ban file too big" from front page of this forum.
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

Offline Stickly Man!

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 1270
  • Karma: 164
  • What even IS software anymore?
    • XGUI
Re: Making bans log to a new file while bans in the old file are still banned
« Reply #2 on: December 04, 2017, 07:46:57 AM »
The latest development version of ULib is now storing bans in SQLite. I thought we had released it already, but apparently not. You'll have to install it manually, of course. Here's the link with more info:
https://forums.ulyssesmod.net/index.php/topic,10520.0.html

And here's where you should download (or grab SVN links for) the latest development versions. The 'fix-37' branch listed in the above thread is now a bit out of date.
https://github.com/TeamUlysses/ulx
https://github.com/TeamUlysses/ulib
Join our Team Ulysses community discord! https://discord.gg/gR4Uye6