Feature #562
Left 4 Dead IDs
| Status: | Resolved | Start: | 11/22/2008 | |
| Priority: | High | Due date: | ||
| Assigned to: | Erik Minekus | % Done: | 100% |
|
| Category: | Web/Plugin | |||
| Target version: | 1.4.0 | |||
Description
Left 4 Dead comes with a new ID convention (it would be pertinent to include support for both L4D and non-L4D IDs)
Example: My usual Steam ID STEAM_0:0:67699
My L4D Steam ID STEAM_1:0:67699
The simplest answer I can think of is a second ID field.
Associated revisions
History
Updated by Olly Ginger 44 days ago
STEAM_1 - Means they joined though a lobby
STEAM_0 - Is standard
It might be an idea just to store the 0:00000 part in the database, because the rest of the steamid is always the same.
Updated by Erik Minekus 44 days ago
I was told that that was the difference yesterday, but it didn't occur to me until I read your post just now. Does that mean that if you connect directly to a server (for example through the console) in L4D, that your Steam ID will be STEAM_0? I just figured they would always be STEAM_1 because of the matchmaking system.
Updated by Lane Babuder 44 days ago
What I've noticed when joining an empty exclusive server is it will always auto-create the lobby. I've also direct connected to an empty and a currently playing versus server both instances resulted in me having "STEAM_1", I've yet to have an L4D instance of STEAM_0.
Updated by Recon _ 43 days ago
According to the SM dev team, there will be some kind of steam normalization in 1.2.
Updated by Lane Babuder 43 days ago
Yes, they will be omitting STEAM_X: in 1.2
But until then it means anyone using SB with SourceMod 1.1 or earlier would have to have support for both :-/ (or create 2 users per person)
Updated by Erik Minekus 43 days ago
I'm pretty sure BAILOPAN said he would put it in 1.1. It would still leave 1.0 users out though.
Updated by Lane Babuder 42 days ago
I asked him when Viper told me this was the plan, him and predcrab both told me that it would only be 1.2.
Updated by Recon _ 42 days ago
I have to agree with Olly.
Modify the plugin so it knows how to deal with shortened Steam IDs (when running on < 1.2) and have done with it.
Updated by Erik Minekus 41 days ago
This has now been added to SM 1.1: https://bugs.alliedmods.net/show_bug.cgi?id=3428
I'm pretty sure this means we don't need to do anything anymore (once they put it in 1.2 so it works on L4D).
Updated by Lane Babuder 41 days ago
Alright, well, now while SourceMod handles non-STEAM_*, our interface (and next update), should truncate those parts of the Steam ID (if already in the admins list), and also truncate the necessity for inputting them. IE Interface would say: "Input Steam ID STEAM_*:[INPUTBOXHERE]"
Or something of the like. Or explain that your steam ID is everything a fter STEAM_*:
Updated by Erik Minekus 41 days ago
Well, we don't have to, because we can still input STEAM_0:1:2345 into SourceMod and it will just truncate STEAM_0:. So even if you input STEAM_0:1:2345, people with STEAM_1:1:2345 will have admin too.
Updated by Olly Ginger 41 days ago
you will need to fix it for reading the steam id's out of the database, because they are stored as STEAM_0 so the interface/plugin will need changign
Updated by Erik Minekus 41 days ago
It currently works fine on all our L4D servers, without changing the plugin. My previous post explains why :)
Updated by Max Krivanek 40 days ago
That's fine and all, but what about bans themselves?
Wouldn't a banned user be able to join because his Steam ID is STEAM_1:X:XXXX instead of STEAM_0:X:XXXX?
Updated by Max Krivanek 39 days ago
I've been using SourceBans and I can confirm pretty much anything relating to the Steam ID is broken in Left 4 Dead. This is admins, bans, and banning.
I've made temporary patches myself.
ReplaceString(identity, sizeof(identity), "STEAM_1:", "STEAM_0:");
:)
Updated by Erik Minekus 39 days ago
Then you are not using the latest SourceMod 1.2. Admin works fine with that on our 13 L4D servers.
Updated by Lane Babuder 39 days ago
Whether that be the case or not, he is right about one thing: SourceBans should handle the bans in this manner.
Updated by Recon _ 39 days ago
One question: How can bans work without a code change?
Consider the following code snippet
// Banned client connecting
OnClientAuthorized(client)
{
decl String:steam[25];
decl String:query[256];
GetClientAuthString(client, steam, sizeof(steam));
// steam from GetClientAuthString = "x:xxxxx"
// steam in database = "STEAM_0:x:xxxxxx"
Format(query, sizeof(query), "SELECT bid FROM sb_bans WHERE steam = '%s';", steam);
// Query execs and returns no rows and the banned player is allowed in
}
You could fix it by changing the query:
Format(query, sizeof(query), ("SELECT bid FROM sb_bans WHERE steam LIKE '%%s'", steam);
Updated by Max Krivanek 39 days ago
Well, I download SourceMod last night for n00bSalad's L4D server. GetClientAuthString() was returning full Steam IDs (i.e., STEAM_1:X:XXXXX) and admin was not working. Either they broke it in the version I was using or something else.
My SourceMod version: sourcemod-1.2.0-hg2421
Updated by Max Krivanek 39 days ago
Note that I was able to temporarily fix this behavior so that it would work with proper ReplaceString() calls within the right places.
Updated by Recon _ 38 days ago
SB needs to remove or some how normalize the STEAM_x part. I recommend that it just be removed. Once that's done, the ban check query will have to be modified to be something like what I posted above.
Updated by Erik Minekus 38 days ago
Max said quite the opposite. GetClientAuthString() still returns their full Steam ID (as it should), so banning still works fine. I already mentioned earlier that admin works fine on our 13 L4D servers, so I don't know what could be wrong if you're using the latest MM:S 1.7 and SM 1.2.
Updated by Max Krivanek 38 days ago
GetClientAuthString() will return STEAM_1:X:XXXXX in L4D. At least in the version I had downloaded from SourceMod's website.
Updated by Max Krivanek 38 days ago
Also note, Recon's code won't work simply because the auth string used by SourceBans is the one passed through OnClientAuthorized(client, const String:auth[]).
Updated by Recon _ 38 days ago
If you banned a player from CS:S, their steam ID would be STEAM_0:x:xxx. In L4D, GetClientAuthString would return STEAM_1:x:xxxx and the IDs wouldn't match. Therefore, the banned player would be allowed in.
Max,
It was just an example to prove a point. SB might get the auth id differently, but the should be concept the same. If the auth parameter has the STEAM_x part already removed, then yes, the concept is different; All you would have to do is change the query.
Updated by Max Krivanek 35 days ago
Simply make it like the leagues' standard. Steam IDs being: 0:12345 since that part is the only one that matters in this case.
Also, even though I guess this would be a separate bug/feature request it would be nice if SourceBans did check a web-ban Steam ID. I've seen admins accidentally putting a space or tab or something else in the Steam ID field thus resulting in the ban not working.
Updated by Lane Babuder 28 days ago
- Status changed from New to Assigned
Updated by Erik Minekus 6 days ago
- % Done changed from 0 to 100