ULX

Author Topic: ULX reserved slots not kicking players until after they download server maps,etc  (Read 2568 times)

0 Members and 2 Guests are viewing this topic.

Offline Storm

  • Full Member
  • ***
  • Posts: 220
  • Karma: 4
It's a maddening problem. My servers get totally full and I (or admins) can't get in for 2 - 6 minutes because the reserved slot doesn't kick a joining player until he has downloaded all the server maps/materials and then tries to connect. Isn't there a way to fix it so it kicks the player immediately? I get so many complaints from players that they download everything and wait, only to be kicked right before they join. I know someone posted some code to fix this but it just doesn't seem to work for me.

Offline MrPresident

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 2728
  • Karma: 430
    • |G4P| Gman4President
This is because a player downloads content from the server before they are authenticated to the server. Meaning that the server doesn't know the player's SteamID until after they download the content.

The addon you speak of makes use of the Password hook which checks first, the same as if you had a password on your server. Since the server doesn't know a player's SteamID at this point, ULX cannot make use of this hook for player authentication. Only the 64bit SteamID is passed to the password hook. You can convert the 64bit steamid to a normal one and back with a little trickery which is what the addon you mentioned does.

Offline iSnipeu

  • Jr. Member
  • **
  • Posts: 83
  • Karma: 12
This is because a player downloads content from the server before they are authenticated to the server. Meaning that the server doesn't know the player's SteamID until after they download the content.

The addon you speak of makes use of the Password hook which checks first, the same as if you had a password on your server. Since the server doesn't know a player's SteamID at this point, ULX cannot make use of this hook for player authentication. Only the 64bit SteamID is passed to the password hook. You can convert the 64bit steamid to a normal one and back with a little trickery which is what the addon you mentioned does.
Incase you hadn't noticed garry has added a function to convert the 64bit steamid to a regular one, so you don't have to use a custom function to get it anymore http://wiki.garrysmod.com/page/util/SteamIDFrom64

Offline Storm

  • Full Member
  • ***
  • Posts: 220
  • Karma: 4
Ok thanks for the info! Time to go to coderhire!!

Offline Megiddo

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 6214
  • Karma: 394
  • Project Lead
* Megiddo ponders if he should just move ULib to SteamID-only instead of supporting Steam ID, Unique ID, and IP, as this would support many recent requests
Experiencing God's grace one day at a time.

Offline MrPresident

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 2728
  • Karma: 430
    • |G4P| Gman4President
I think you should... I don't know of anyone who uses IP address or UID authentication.

Also, last I checked, iSnipeu, his functions were broken. At least the one that converts a steamid to 64bit is broken. The reverse may work.

Offline iSnipeu

  • Jr. Member
  • **
  • Posts: 83
  • Karma: 12
I think you should... I don't know of anyone who uses IP address or UID authentication.

Also, last I checked, iSnipeu, his functions were broken. At least the one that converts a steamid to 64bit is broken. The reverse may work.

Just checked then and it looks like util.SteamIDTo64 is broken but util.SteamIDFrom64 is working fine.