I figured I would share this little snippet, this will convert a STEAMID to the a players friendID which is used for steam community.
What could potentially be done with this, is to fetch data on a player, see what groups he is in, and basically gives you the flexibility to ban whole groups from your server without knowing all of their steamids.
At least, thats what I intend to do with it. You can also of course do the reverse, converting friend ID's to steamids.
__int64 GetFriendID( const char *pszAuthID )
int iServer = 0;
int iAuthID = 0;
strcpy_s(szAuthID, 63, pszAuthID);
char *szTmp = strtok(szAuthID, ":");
while(szTmp = strtok(NULL, ":"))
char *szTmp2 = strtok(NULL, ":");
iServer = atoi(szTmp);
iAuthID = atoi(szTmp2);
if(iAuthID == 0)
__int64 i64friendID = (__int64)iAuthID * 2;
//Friend ID's with even numbers are the 0 auth server.
//Friend ID's with odd numbers are the 1 auth server.
i64friendID += 76561197960265728 + iServer;
Edit: Using this a Pure MySQL