Last active
September 3, 2016 08:42
-
-
Save aveao/94acf6161a730102bacc3abeb975258c to your computer and use it in GitHub Desktop.
Simple VAC Ban checker. You can give custom url (ardaozkal) or steamid64 (76561198034299068) to it and it'll return true if the user is vac banned (or if the account is unable to be found).
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
static bool IsVacBanned(string steamID) | |
{ | |
var wc = new WebClient(); | |
string ProfileLink = "http://steamcommunity.com/"; | |
ProfileLink += (steamID.StartsWith("765")) ? "profiles/" : "id/"; | |
ProfileLink += steamID + "?xml=1"; | |
var ProfileData = wc.DownloadString(ProfileLink); | |
return !ProfileData.Contains("<vacBanned>0</vacBanned>"); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You can also do "using (var wc = new WebClient())".