public void AuthProcess(ClientConnection client, string token) { using (var db = _lsDbFactory.OpenSession()) { var model = db.QueryOver<AccountData>().Where(p => p.GameHash == token).Take(1).SingleOrDefault(); //get account data by token if (model == null) { client.CloseConnection(); return; } if (model.ExpireTime < DateTime.Now) { client.CloseConnection(); return; } client.Account = model; new SpUnk().Send(client, false); new SpUnk2().Send(client, false); Core.Act(s => s.LobbyProcessor.GetCharacterList(client)); } }
public void CloseClientRequest(ClientConnection connection) { Core.Act(s => { connection.CloseConnection(); }, CfgCore.Default.LogoutSeconds * 1000, connection.ActivePlayer.CancelTokenSource); }