forked from lavina/lavina
mr comments fix
This commit is contained in:
parent
5eb0385012
commit
942546d579
|
@ -81,7 +81,7 @@ async fn handle_socket(
|
|||
match registered_user {
|
||||
Ok(user) => {
|
||||
log::debug!("User registered");
|
||||
handle_registered_socket(config, core.players, core.rooms, &mut reader, &mut writer, user, &mut storage).await?;
|
||||
handle_registered_socket(config, core.players, core.rooms, &mut reader, &mut writer, user).await?;
|
||||
}
|
||||
Err(err) => {
|
||||
log::debug!("Registration failed: {err}");
|
||||
|
@ -425,7 +425,6 @@ async fn handle_registered_socket<'a>(
|
|||
reader: &mut BufReader<ReadHalf<'a>>,
|
||||
writer: &mut BufWriter<WriteHalf<'a>>,
|
||||
user: RegisteredUser,
|
||||
storage: &mut Storage,
|
||||
) -> Result<()> {
|
||||
let mut buffer = vec![];
|
||||
log::info!("Handling registered user: {user:?}");
|
||||
|
@ -505,7 +504,7 @@ async fn handle_registered_socket<'a>(
|
|||
len
|
||||
};
|
||||
let incoming = std::str::from_utf8(&buffer[0..len-2])?;
|
||||
if let HandleResult::Leave = handle_incoming_message(incoming, &config, &user, &rooms, &mut connection, writer, storage.clone()).await? {
|
||||
if let HandleResult::Leave = handle_incoming_message(incoming, &config, &user, &rooms, &mut connection, writer).await? {
|
||||
break;
|
||||
}
|
||||
buffer.clear();
|
||||
|
@ -697,7 +696,6 @@ async fn handle_incoming_message(
|
|||
rooms: &RoomRegistry,
|
||||
user_handle: &mut PlayerConnection,
|
||||
writer: &mut (impl AsyncWrite + Unpin),
|
||||
mut storage: Storage,
|
||||
) -> Result<HandleResult> {
|
||||
log::debug!("Incoming raw IRC message: '{buffer}'");
|
||||
let parsed = client_message(buffer);
|
||||
|
|
Loading…
Reference in New Issue