Why do we do it like this?
#1

Why do we load the ban files from one large file? Why not just make a folder called /bans/, and every time a person gets banned, a file is created (IP.cfg).
In this file, we would have this:
Код:
Names = 
BanDate =
UnbanDate = 
Reason =
For example, if someone was banned for 1 day for being rude to admins, and when they were banned, they logged in (from the same IP) with a different name, it would look like this:
(The person was banned on "JohnnyA" and then evaded on JohnnyB")
Код:
Names = JohnnyA, JohnnyB
BanDate = 29/01/2014
UnbanDate = 30/01/2014
Reason = Rudeness/insults to admins
You could then use a byte searcher to scan through the files for the name (for example, they log into JohnnyA from a different IP), and then create a new file like this:
Код:
Names = JohnnyA
BanDate = 29/01/2014
UnbanDate = 0
Reason = Evasion: Rudeness/insults to admins
And so on.
Reply
#2

Because that is scriptable if you have the knowledge...
The ban system SA-MP comes with is just a basic one. Most of the big servers have their own custom ban system.
Reply
#3

I know, but why doesn't SAMP make a better default one?

(And I know it can be scripted, I was posting this hoping someone would say that, thanks :P)
Reply
#4

Bump.
Reply
#5

Well, it's not very memory friendly to create separate ban files for all players. And especially on the popular servers, 10 people are banned each day, that means 10 files each day,instead of just ten lines in the samp.ban file.
Reply
#6

why did you bump this? sa-mp has a basic ban log, if you want a better one script it.
Reply
#7

Quote:
Originally Posted by DJDhan
Well, it's not very memory friendly to create separate ban files for all players. And especially on the popular servers, 10 people are banned each day, that means 10 files each day,instead of just ten lines in the samp.ban file.
Because on those "popular servers", it has to search through a file of sometimes 1000+ lines to find if the player is banned or not.
Reply
#8

Better than searching for bans in "even more" player files.
Reply
#9

Quote:
Originally Posted by DJDhan
Better than searching for bans in "even more" player files.
No it's not. Sure, it's inefficient because it creates a seperate file, but it's quicker to read.
Reply
#10

Some servers have >50,000 account files. The wasted disk space would be stupid.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)