AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Checking the Age of a SteamID (https://forums.alliedmods.net/showthread.php?t=82328)

endeffects 12-21-2008 10:56

Checking the Age of a SteamID
 
Hallo,

i'm thinking about to add an age check on some of my plugin,
it could be usefull to warn a connected admin when a player with
a brand new steam account connects to the server or to restrict
such players to connect to the server.

as you probably know for old games like cs 1.6 such brand new
accounts are almost used by cheaters. an other point would be
to have a senior server only.

however, my tought to detect such accounts was to use the steam id
and to calculate the steamcommunity id out of it.

you can read more about it here:
http://forums.alliedmods.net/showthread.php?t=60899

as you probably know, when you create a new steam account you
getting a new sequential community id. this id rises with each new account.
for that reason it is possible to have one community id from a specific
date and to check each player and his steam id against it.
so it is easy to say if a steam account is younger/older then that date.

how to calculate the community out of a steamid (pseudo code):

SteamID:= 'STEAM_0:1:123456'
SteamID:= delete 'Steam_0:' from SteamID
SteamID:= '1:123456' //result

FirstNumber:= copy everything before : of SteamID
FirstNumber:= '1'; //result
SecondNumber:= copy everything behind : of SteamID
SecondNumber:= '123456' //result

SecondNumber:= SecondNumber * 2
SecondNumber:= FirstNumber + SecondNumber

SecondNumber:= SecondNumber + 76561197960265728;

SecondNumber contains the CommunityID now, however,
i think the last step can be skipped. Because amxx don't supports
Int64 so we can't operate with this value.

Finally we choosing an other CommunityID from a specfic date
and subtract 76561197960265728. Now we can compare this
number with any SteamID if the account is younger or older.

Hopefully someone can help me to translate this into amxx code.
I'm not such advanced in the amxx syntax.

endeffects 12-21-2008 13:06

Re: Checking the Age of a SteamID
 
got it working with some code snipes of danialkza, thanks alot.

you'll find the age check within my wallhack detector
http://forums.alliedmods.net/showthread.php?t=82111

Spunky 12-21-2008 15:17

Re: Checking the Age of a SteamID
 
Don't restrict players based on how old their account is. That's stupid. It was done here and failed for very good reasons. It's unfair and it's a shitty thing to do.

stupok 12-21-2008 20:10

Re: Checking the Age of a SteamID
 
It's plainly obvious that a steam id does not depend on a user's skill, age, or likelihood to use cheats. It does, however, directly correlate with the age of the steam id.

The age of the steam id may correlate with the user's age, skill, or likelihood to use cheats. To my knowledge, there is no documented evidence that would support or contradict this claim. The overall effect of having new steam id's blocked may be a more enjoyable server with less hackers and less youngsters.

Server operators can do anything they want. Some things are looked down upon, like slow-hacking or executing client-side commands. As a client, you can't make demands for a particular server operator to do something. If you don't want to be slow-hacked or discriminated against, don't join that server.

To be fair, I'll repeat that I have no evidence to support or contradict the claim that players with new steam ids are more likely to be "bad" clients. From experience, you might see that there is a correlation.

This plugin is ethically questionable. It will increase the "suffering" for certain clients that are kicked based on steam id, but it may also decrease the suffering for the server operator and the clients that play in his server. Overall, the amount of suffering experienced by the banned clients is less than the "suffering" of the server operator and his clients when they have to deal with the hackers and youngsters that join the server. The use of this plugin also necessarily includes denying access to players that will not only maintain but also increase the quality of the server. That is, the plugin will potentially reduce the quality of the server.

Of course, the measure of suffering is entirely subjective. If I join a server and am instantly kicked, I don't even blink and move on to the next one. However, if I see an unruly player or hacker in my server, the players in my server and I are all affected by his behavior and must take the time to deal with him and attempt to repair the damage he's done to the server, if that is possible. For me, personally, dealing with a "bad" client is worse than dealing with being kicked from a server upon joining.

So, the plugin may reduce the total suffering in the system, even though it also stops potentially "good" players from joining, resulting in reduced server quality.

There is a problem with saying that the plugin is ethically sound, should be approved, and further that it should be used by all servers to reduce suffering in the system. If all servers (or even a large number of servers) use this plugin, the amount of "suffering" for the blocked clients increases. A point may be reached where these blocked clients will be suffering more than the server operators and their unblocked clients, because the blocked clients won't have any servers to play on.

Let's say there are two situations:
1. All servers use this plugin.
2. No servers use this plugin.

In this case, with only two options, I support option two, because it involves less total suffering in the system. If the plugin is approved, I believe it is deemed acceptable to be run on all servers, implying that option number one would also be deemed as an acceptable situation. So, I agree with YamiKaitou's decision to mark the plugin as unapproved.

However, there exists another situation:
3. Some servers use this plugin.

In this situation, I don't mind helping you write the plugin, because I will also be reducing the suffering in the system (until too many servers use this plugin).

Spunky 12-21-2008 20:42

Re: Checking the Age of a SteamID
 
You make a point. I get what you're saying but I still don't think this plugin should even exist. amx_ban exists to deal with unruly players. If this it to counter against hackers or noobs, then you're just being a lazy jackass and causing people who haven't really done anything wrong to unfairly suffer in the process. So what's the point?

Bugsy 12-21-2008 21:00

Re: Checking the Age of a SteamID
 
I don't agree with allowing a plugin like this to restrict players from joining\playing on a server. There are people that may see Half-Life\Counter-Strike at Wal-Mart for $10 and pick it up just because they heard it was good (as I did back in 2004). So I bring it home, install it, and try to connect to the server and I get "Sorry you cant play here hacker!" I'm sure there are plenty of those "young" steamid's that exist because their original steamid was VAC-banned but you can't assume that for everyone.

No doubt, displaying the age of a steamid could be a neat touch for plugins but just not for restricting who can play. Just my opinion

danielkza 12-21-2008 21:31

Re: Checking the Age of a SteamID
 
Quote:

Originally Posted by Bugsy (Post 731184)
I don't agree with allowing a plugin like this to restrict players from joining\playing on a server. There are people that may see Half-Life\Counter-Strike at Wal-Mart for $10 and pick it up just because they heard it was good (as I did back in 2004). So I bring it home, install it, and try to connect to the server and I get "Sorry you cant play here hacker!" I'm sure there are plenty of those "young" steamid's that exist because their original steamid was VAC-banned but you can't assume that for everyone.

No doubt, displaying the age of a steamid could be a neat touch for plugins but just not for restricting who can play. Just my opinion

This would also refrain no-steam players to buy the actual game. If I knew I was gonna be rejected from playing a game I bought based on how long I have it I would instantly disconsider getting it legally.

stupok 12-22-2008 08:21

Re: Checking the Age of a SteamID
 
To be honest, I don't know what these numbers have to do with age, but here's what you posted:

PHP Code:

/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <amxmisc>

#define PLUGIN "New SteamID Blocker"
#define VERSION "1.0"
#define AUTHOR "stupok"


public plugin_init()
{
    
register_plugin(PLUGINVERSIONAUTHOR)
}

public 
client_authorized(id)
{
    new 
SteamID[32]
    
    
get_user_authid(idSteamID31)
    
    new 
iFirstNum SteamID[8] - 48
    
new iSecondNum str_to_num(SteamID[9])
    
    
iSecondNum iFirstNum + (iSecondNum 2) + 76561197960265728
    
    
// do something...




All times are GMT -4. The time now is 09:18.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.