Changed to use a separate account for each email address.

This commit is contained in:
Kei-Luna
2026-05-13 08:15:33 +09:00
parent 5332d5fe1a
commit 41df375e21
7 changed files with 146 additions and 19 deletions

View File

@@ -21,11 +21,13 @@ public class HandlerReqLogin : Handler
public override async Task OnHandle(Connection connection, byte[] data, ushort seqNo)
{
var req = ReqLogin.Parser.ParseFrom(data);
var account = AccountData.GetAccountByUid(1);
var account = AccountData.GetAccountByComboToken(req.Token)
?? AccountData.GetAccountByDispatchToken(req.Token)
?? AccountData.GetAccountByUid(10001)
?? AccountData.GetAccountByUid(1);
if (account == null)
{
AccountData.CreateAccount("MIKU", 0, "");
account = AccountData.GetAccountByUid(1);
account = AccountData.CreateAccount("default@mikusb.local", 10001, "");
if (account == null)
{
await connection.SendPacket(CmdIds.NtfLogout);