@@ -89,9 +89,6 @@ public static void Login()
8989 ChatLoggerManager . Subscribe < SteamUser . AccountInfoCallback > ( OnAccountInfo ) ;
9090 ChatLoggerManager . Subscribe < SteamUser . UpdateMachineAuthCallback > ( OnMachineAuth ) ;
9191 ChatLoggerManager . Subscribe < SteamUser . LoginKeyCallback > ( OnLoginKey ) ;
92-
93-
94-
9592 ChatLoggerManager . Subscribe < SteamFriends . FriendMsgCallback > ( OnFriendMsg ) ;
9693 ChatLoggerManager . Subscribe < SteamFriends . FriendMsgEchoCallback > ( OnFriendEchoMsg ) ;
9794
@@ -176,8 +173,7 @@ static void OnLoggedOn(SteamUser.LoggedOnCallback callback)
176173
177174 if ( is2FA )
178175 {
179- //MercuryBOT.InfoForm.InfoHelper.CustomMessageBox.Show("Steam Guard detected, showing form!");
180- SteamGuard SteamGuard = new SteamGuard ( ) ;
176+ SteamGuard SteamGuard = new SteamGuard ( "Phone" , user ) ;
181177 SteamGuard . ShowDialog ( ) ;
182178
183179 bool UserInputCode = true ;
@@ -211,20 +207,20 @@ static void OnLoggedOn(SteamUser.LoggedOnCallback callback)
211207 if ( pass != null )
212208 {
213209 Console . WriteLine ( "[" + Program . BOTNAME + "] - Login key expired. Connecting with user password." ) ;
214- InfoForm . InfoHelper . CustomMessageBox . Show ( "Info" , "Login key expired/Wrong Password. Connecting with user password." ) ;
210+ InfoForm . InfoHelper . CustomMessageBox . Show ( "Info" , "Login key expired or wrong Password. Connecting with user password. Wait 3secs.. ." ) ;
215211
216212 }
217213 else
218214 {
219215 Console . WriteLine ( "[" + Program . BOTNAME + "] - Login key expired." ) ;
220- InfoForm . InfoHelper . CustomMessageBox . Show ( "Info" , "Login key expired! Gathering new ..." ) ;
216+ InfoForm . InfoHelper . CustomMessageBox . Show ( "Info" , "Login key expired! Wait 3secs ..." ) ;
221217 }
222218 }
223219 else
224220 {
225221 Console . Write ( "[" + Program . BOTNAME + "] - Please enter the auth code sent to the email at {0}: " , callback . EmailDomain ) ;
226222
227- SteamGuard SteamGuard = new SteamGuard ( ) ;
223+ SteamGuard SteamGuard = new SteamGuard ( callback . EmailDomain , user ) ;
228224 SteamGuard . ShowDialog ( ) ;
229225
230226 bool UserInputCode = true ;
@@ -279,10 +275,7 @@ static void OnDisconnected(SteamClient.DisconnectedCallback callback)
279275
280276 steamClient . Connect ( ) ;
281277 }
282-
283-
284-
285-
278+
286279 static void OnLoginKey ( SteamUser . LoginKeyCallback callback )
287280 {
288281 myUniqueId = callback . UniqueID . ToString ( ) ;
@@ -429,6 +422,7 @@ public static string GetPersonaName(ulong steamid)
429422
430423 public static void Logout ( )
431424 {
425+ user = null ;
432426 isRunning = false ;
433427 IsLoggedIn = false ;
434428 steamUser . LogOff ( ) ;
0 commit comments