Author Topic: Bans.  (Read 2460 times)

0 Members and 1 Guest are viewing this topic.

Offline Hardy

  • Newbie
  • *
  • Posts: 42
  • Karma: 0
Bans.
« on: February 03, 2009, 08:22:57 AM »
Hello everybody. I have one question: is ulib uses standart source bans or bans is parsed somewhere?
Because i want Amxbans-style bans. It must kick player "You are banned. Check your console" and write in console
Player name: blah
Player SteamID: blah
Reason: blah
Banner: blah
Expires: blah
You can complain your regards on http://blah.blah

Kick with "SteamID 123456 is banned" is stupid and not informative :)

Offline MrPresident

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 2728
  • Karma: 430
    • |G4P| Gman4President
Re: Bans.
« Reply #1 on: February 04, 2009, 06:15:50 PM »
This has already been suggested before.. but the reason why it is not the case is because to do that, you'd have to let the client authenticate a SteamID which takes up a slot and can take a time depending on their connection. The STEAM ban method doesn't allow them to do that and they don't fill a slot on the server for any amount of time.

What you are suggesting is possible, but you'd have to rewrite how banning works in lua. Not hard, I did it on my server with my SQL database. You just have it save to a table in a text file or in SQLite and then on AUthenticate have it check to see if the client is in teh table and if they are.. kick them and display teh info you want.

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: Bans.
« Reply #2 on: February 04, 2009, 08:09:00 PM »
Hardy, to answer your question, ULib uses standard Source/SteamId bans.
Once a player is permanently banned/kicked, ULib never sees that player again.
As MrPresident explains, simplest terms; Lua is one of the last things to 'see' a player when they join a server.
AMX sees them (I believe) right as the server does because it is running as a dll/binary along side the server code.
ULib doesn't use binary code running on servers like AMX does, it uses Lua, which is initialized _after_ a player has connected.

I don't believe it would be possible to even write a lua script monitoring system to look for the previously banned players... I don't think the banned player attempting to join sets off any hooks.
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

Offline MrPresident

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 2728
  • Karma: 430
    • |G4P| Gman4President
Re: Bans.
« Reply #3 on: February 05, 2009, 06:24:13 AM »
They don't Jam.. like I said the ONLY way to do it would be to remove the player(s) from the source ban list and have the ban system be entirely in lua. Having your ulx ban write to a list and then checking every joining player (after lua sees them) against said list. This poses a problem though because as I said before... They have to go through all of the initalize stuff such as downloading files... connecting to the server and then receiving server info and sending client data before lua will be able to detect and kick them.