Dota 2 Spectator Client in Node , based on [node-steam](https://github.com/seishun/node-steam) 1.0.0+
A node-steam plugin for Dota 2 Spectator Client. Spectate dota2 games
npm install steam
&& npm install
in the node-dota2-spectator
directory
var steam = require('steam'),
dota = require('dota'),
bot = new steam.SteamClient(),
user = new steam.SteamUser(bot),
gc = new steam.SteamGameCoordinator(bot, 570);
dota2 = new dota.Dota2Client(user, gc, true);
I just found out that the old sentry file is a sha1
fingerprint of the new sentry
if (fs.existsSync('sentryfile/'+logOnDetails.account_name)){
logOnDetails.sha_sentryfile = fs.readFileSync('sentryfile/' + logOnDetails.account_name);
util.log('sentry loaded');
}
Test result: old sentrys are accept by steam
var onUserUpdateMachineAuth = function onUserUpdateMachineAuth(sentry, callback){
var sentryfile = crypto.createHash('sha1').update(sentry.bytes).digest();
fs.writeFileSync('sentryfile/'+config.steam_user, sentryfile);
util.log("sentryfile saved");
callback({ sha_file: sentryfile });
}
refer to the example.js
for more
Write a handler
.js then import it to the index.js
This script is release under MIT license. Refer to the LICENSE file for more information.