var https = require("https");
var fs = require("fs");
var url = require("url");
var path = require("path");

var protos = [
	"https://raw.githubusercontent.com/SteamDatabase/GameTracking/master/Protobufs/csgo/base_gcmessages.proto",
	"https://raw.githubusercontent.com/SteamDatabase/GameTracking/master/Protobufs/csgo/cstrike15_gcmessages.proto",
	"https://raw.githubusercontent.com/SteamDatabase/GameTracking/master/Protobufs/csgo/engine_gcmessages.proto",
	"https://raw.githubusercontent.com/SteamDatabase/GameTracking/master/Protobufs/csgo/gcsdk_gcmessages.proto",
	"https://raw.githubusercontent.com/SteamDatabase/GameTracking/master/Protobufs/csgo/steammessages.proto",
	"https://raw.githubusercontent.com/SteamRE/SteamKit/master/Resources/Protobufs/steamclient/steammessages_clientserver.proto",
	"https://raw.githubusercontent.com/SteamRE/SteamKit/master/Resources/Protobufs/steamclient/steammessages_clientserver_2.proto",
	"https://raw.githubusercontent.com/SteamRE/SteamKit/master/Resources/Protobufs/steamclient/steammessages_base.proto",
	"https://raw.githubusercontent.com/SteamRE/SteamKit/master/Resources/Protobufs/steamclient/encrypted_app_ticket.proto"
];

function download(downloadUrl) {
	var fileName = path.basename(url.parse(downloadUrl).pathname);

	console.log("\tDownloading " + fileName);
	var file = fs.createWriteStream(__dirname + "/protos/" + fileName);
	var request = https.get(downloadUrl, function(response) {
	  response.pipe(file);
	});
}

console.log("Updating protobufs...");

var oldProtos = fs.readdirSync(__dirname + "/protos/");
oldProtos.forEach(function(fileName) {
	if (fileName.indexOf(".proto") != -1) {
		console.log("\tRemoving old protobuf file: " + fileName);
		fs.unlinkSync(__dirname + "/protos/" + fileName);
	}
});

protos.forEach(function(url) {
	download(url);
});

console.log("Update complete!");

@@ -171,32 +171,37 @@
 ase/GameTracking
+-CSGO
 /master/Protobuf
@@ -202,21 +202,16 @@
 otobufs/
-csgo/
 base_gcm
@@ -280,32 +280,37 @@
 ase/GameTracking
+-CSGO
 /master/Protobuf
@@ -311,21 +311,16 @@
 otobufs/
-csgo/
 cstrike1
@@ -394,32 +394,37 @@
 ase/GameTracking
+-CSGO
 /master/Protobuf
@@ -425,21 +425,16 @@
 otobufs/
-csgo/
 engine_g
@@ -505,32 +505,37 @@
 ase/GameTracking
+-CSGO
 /master/Protobuf
@@ -536,21 +536,16 @@
 otobufs/
-csgo/
 gcsdk_gc
@@ -623,16 +623,21 @@
 Tracking
+-CSGO
 /master/
@@ -650,13 +650,8 @@
 ufs/
-csgo/
 stea

Update SteamDatabase protobuf paths