SAMP ban system, why not?
#5

When someone says "slow" in programming terms, they don't mean it takes several seconds or more to unban/ban a player.
"Slow" means that there are faster alternatives and also "slow" indicates that it might take +50ms to do one simple thing.

This may not look server-breaking but it might introduce lag-spikes when used often.

Also, reading/writing files in general is slow as they are not threaded.
The script must wait for reading/writing to be completed.

If rewriting the samp.bans file takes 100ms, your script can't do anything else.
Processing callbacks, timers, even OnPlayerConnect callbacks all have to wait until file-processing has been completed.

Also, generally speaking, you're not banning 10 players every second or so to experience serious lag which hinders your players.
If a player is banned once every 5 minutes, and your ban-system takes 100ms to execute the ban (rewriting samp.bans file), this will not break your server.
Your players MAY occasionally feel a lag-spike that only lasts 100ms.
But that doesn't mean it can't be improved either.

Using a MySQL database for your ban-system can use threaded queries and won't hog your server that much.
It also is more flexible as Vince already said, that you can determine the ban-time and give a custom message explaining why the player was banned.
Reply


Messages In This Thread
SAMP ban system, why not? - by Evocator - 21.02.2015, 17:27
Re: SAMP ban system, why not? - by Puppy - 21.02.2015, 17:46
Re: SAMP ban system, why not? - by PowerPC603 - 23.02.2015, 00:03
Re: SAMP ban system, why not? - by Vince - 23.02.2015, 17:49
Re: SAMP ban system, why not? - by PowerPC603 - 23.02.2015, 18:57
Re: SAMP ban system, why not? - by HeLiOn_PrImE - 23.02.2015, 21:59
Re: SAMP ban system, why not? - by cessil - 24.02.2015, 01:00
Re: SAMP ban system, why not? - by PowerPC603 - 24.02.2015, 10:34
Re: SAMP ban system, why not? - by [HLF]Southclaw - 24.02.2015, 15:57

Forum Jump:


Users browsing this thread: 1 Guest(s)