login to start
This commit is contained in:
@ -6,16 +6,26 @@
|
||||
/* By: tomoron <tomoron@student.42angouleme.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2026/05/07 17:23:09 by tomoron #+# #+# */
|
||||
/* Updated: 2026/06/05 12:36:46 by tomoron ### ########.fr */
|
||||
/* Updated: 2026/06/10 12:29:08 by tomoron ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
use bollard::Docker;
|
||||
use tokio::net::TcpStream;
|
||||
use crate::minecraft::handshake::Handshake;
|
||||
use std::fmt;
|
||||
|
||||
use crate::models::Servers;
|
||||
|
||||
use crate::DbPool;
|
||||
|
||||
use crate::schema;
|
||||
use crate::models;
|
||||
use diesel::prelude::*;
|
||||
|
||||
use regex::Regex;
|
||||
|
||||
|
||||
pub struct Client {
|
||||
pub in_stream: TcpStream,
|
||||
|
||||
@ -28,19 +38,12 @@ pub struct Client {
|
||||
|
||||
pub server: Option<Result<Servers,diesel::result::Error>>,
|
||||
|
||||
pub db_pool: DbPool
|
||||
pub db_pool: DbPool,
|
||||
pub docker: Docker
|
||||
}
|
||||
|
||||
use crate::DbPool;
|
||||
|
||||
use crate::schema;
|
||||
use crate::models;
|
||||
use diesel::prelude::*;
|
||||
|
||||
use regex::Regex;
|
||||
|
||||
impl Client {
|
||||
pub fn create(stream: TcpStream, pool: DbPool) -> Self {
|
||||
pub fn create(stream: TcpStream, pool: DbPool, docker: Docker) -> Self {
|
||||
Self {
|
||||
in_stream: stream,
|
||||
|
||||
@ -53,7 +56,9 @@ impl Client {
|
||||
|
||||
server: None,
|
||||
|
||||
db_pool: pool
|
||||
db_pool: pool,
|
||||
|
||||
docker: docker
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user