fix(core): Handles a rare NPE with LoginTimer (#508)

This commit is contained in:
Kamron Batman 2021-02-11 23:47:02 -08:00 • committed by GitHub
parent b8a625dcd3
commit 952a3e0265
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
18 changed files with 118 additions and 127 deletions

View file

@ -403,10 +403,8 @@ namespace Server.Misc
Console.WriteLine("Login: {0}: Past IP limit threshold", e.State);
using (var op = new StreamWriter("ipLimits.log", true))
{
op.WriteLine("{0}\tPast IP limit threshold\t{1}", e.State, DateTime.UtcNow);
}
using var op = new StreamWriter("ipLimits.log", true);
op.WriteLine("{0}\tPast IP limit threshold\t{1}", e.State, DateTime.UtcNow);
return;
}
@ -414,7 +412,7 @@ namespace Server.Misc
var un = e.Username;
var pw = e.Password;
if (!(Accounts.GetAccount(un) is Account acct))
if (Accounts.GetAccount(un) is not Account acct)
{
e.Accepted = false;
}

View file

@ -15,7 +15,6 @@
using System;
using System.Security.Cryptography;
using System.Text;
using Server.Text;
namespace Server.Accounting.Security

View file

@ -13,7 +13,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
*************************************************************************/
using System;
using System.Buffers;
using System.IO;
using Server.Network;

View file

@ -1,6 +1,5 @@
using System;
using System.Collections.Generic;
using System.Runtime.CompilerServices;
using Server.ContextMenus;
using Server.Engines.PartySystem;
using Server.Engines.Quests.Doom;

View file

@ -1,7 +1,5 @@
using System;
using System.Collections.Generic;
using System.Linq;
using Server.Mobiles;
using Server.Spells;
namespace Server.Items

View file

@ -1,6 +1,5 @@
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using Server.Json;
using Server.Mobiles;

View file

@ -1,9 +1,7 @@
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.CompilerServices;
using Server.Collections;
using Server.Items;
using Server.Multis.Boats;
using Server.Network;