mirror of
https://github.com/JustArchiNET/ArchiSteamFarm.git
synced 2026-01-01 14:10:53 +00:00
Always use LoginID, closes #32
This commit is contained in:
@@ -45,7 +45,6 @@ namespace ArchiSteamFarm {
|
||||
|
||||
private bool LoggedInElsewhere = false;
|
||||
private bool IsRunning = false;
|
||||
private bool IsBeingUsedAsPrimaryAccount = false;
|
||||
private string AuthCode, LoginKey, TwoFactorAuth;
|
||||
|
||||
internal ArchiHandler ArchiHandler { get; private set; }
|
||||
@@ -542,7 +541,8 @@ namespace ArchiSteamFarm {
|
||||
SteamPassword = Program.GetUserInput(BotName, Program.EUserInputType.Password);
|
||||
}
|
||||
|
||||
SteamUser.LogOnDetails logOnDetails = new SteamUser.LogOnDetails {
|
||||
// TODO: We should use SteamUser.LogOn with proper LoginID once https://github.com/SteamRE/SteamKit/pull/217 gets merged
|
||||
ArchiHandler.HackedLogOn(Program.UniqueID, new SteamUser.LogOnDetails {
|
||||
Username = SteamLogin,
|
||||
Password = SteamPassword,
|
||||
AuthCode = AuthCode,
|
||||
@@ -550,14 +550,7 @@ namespace ArchiSteamFarm {
|
||||
TwoFactorCode = TwoFactorAuth,
|
||||
SentryFileHash = sentryHash,
|
||||
ShouldRememberPassword = true
|
||||
};
|
||||
|
||||
if (!IsBeingUsedAsPrimaryAccount) {
|
||||
SteamUser.LogOn(logOnDetails);
|
||||
} else {
|
||||
// TODO: We should use SteamUser.LogOn with proper LoginID once https://github.com/SteamRE/SteamKit/pull/217 gets merged
|
||||
ArchiHandler.HackedLogOn(Program.UniqueID, logOnDetails);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private async void OnDisconnected(SteamClient.DisconnectedCallback callback) {
|
||||
@@ -712,12 +705,9 @@ namespace ArchiSteamFarm {
|
||||
Logging.LogGenericInfo(BotName, "Logged off of Steam: " + callback.Result);
|
||||
|
||||
switch (callback.Result) {
|
||||
case EResult.LogonSessionReplaced:
|
||||
Logging.LogGenericInfo(BotName, "This is primary account, changing logic alt -> main");
|
||||
IsBeingUsedAsPrimaryAccount = true;
|
||||
break;
|
||||
case EResult.AlreadyLoggedInElsewhere:
|
||||
case EResult.LoggedInElsewhere:
|
||||
case EResult.LogonSessionReplaced:
|
||||
LoggedInElsewhere = true;
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user