mirror of
https://github.com/wabbajack-tools/wabbajack.git
synced 2024-08-30 18:42:17 +00:00
27 lines
865 B
C#
27 lines
865 B
C#
|
using System;
|
||
|
using Wabbajack.DTOs.Interventions;
|
||
|
using Wabbajack.Networking.Steam.UserInterventions;
|
||
|
|
||
|
namespace Wabbajack.CLI;
|
||
|
|
||
|
public class UserInterventionHandler : IUserInterventionHandler
|
||
|
{
|
||
|
public void Raise(IUserIntervention intervention)
|
||
|
{
|
||
|
if (intervention is GetAuthCode gac)
|
||
|
{
|
||
|
switch (gac.Type)
|
||
|
{
|
||
|
case GetAuthCode.AuthType.EmailCode:
|
||
|
Console.WriteLine("Please enter the Steam code that was just emailed to you");
|
||
|
break;
|
||
|
case GetAuthCode.AuthType.TwoFactorAuth:
|
||
|
Console.WriteLine("Please enter your 2FA code for Steam");
|
||
|
break;
|
||
|
default:
|
||
|
throw new ArgumentOutOfRangeException();
|
||
|
}
|
||
|
gac.Finish(Console.ReadLine()!.Trim());
|
||
|
}
|
||
|
}
|
||
|
}
|