Skip to content
This repository has been archived by the owner on Apr 2, 2023. It is now read-only.

Commit

Permalink
Logon properly, ignore error stacks
Browse files Browse the repository at this point in the history
I need to stop releasing so much...
  • Loading branch information
kjsmita6 committed Dec 14, 2015
1 parent cac6e65 commit 81906c4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "steam-parentbot",
"version": "2.2.2",
"version": "2.2.3",
"description": "A module that provides a simple base class for a Steam bot that can be easliy overwritten and customized.",
"main": "parentbot.js",
"author": {
Expand Down
5 changes: 4 additions & 1 deletion parentbot.js
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ prototype.logOn = function logOnCallback() {
this.steamUser.logOn({
account_name: that.username,
password: that.password,
two_factor_code: SteamTotp.generateAuthCode(this.options.sharedSecret),
two_factor_code: SteamTotp.generateAuthCode(that.options.sharedSecret),
sha_sentryfile: sha
})
}
Expand Down Expand Up @@ -177,6 +177,9 @@ prototype._onLogOnResponse = function logOnResponseCallback(response) {
if(parseInt(e.eresult) === 2) {
this.logger.error('Failed to enable two factor. Check if you have a phone number enabled for this account.');
}
else if(parseInt(e.eresult) === 29) {
this.logger.warn('Already have 2FA enabled');
}
else {
this.logger.error(e.stack);
}
Expand Down

0 comments on commit 81906c4

Please sign in to comment.