public void ChatRequestList(List <Session> Sessions, ChatRequestListPacket packet) { Console.WriteLine("Received CHAT LIST REQUEST from AccountID = " + packet.AccountID + "."); int accountid = packet.AccountID; List <ChatRoomForApp> chatlist = AccountMgr.GetChats(accountid); Sessions.First(s => s.user.idAccount == accountid).CreateResponse(new MessagePacket(MessageType.MSG_TYPE_CHAT_REQUEST_LIST_RESPONSE, 0, accountid, new ChatRequestListResponse { ChatList = chatlist })); }