mirror of
https://github.com/redstrate/Kawari.git
synced 2025-06-30 11:47:45 +00:00
Don't allow connecting with an older client
I just wasted a few minutes trying to connect, only to realize my client is too old. I thought we declined in these situations already, but I guess not?
This commit is contained in:
parent
69e8e4055e
commit
ec76d3fb31
1 changed files with 5 additions and 0 deletions
|
@ -119,6 +119,11 @@ async fn verify_session(
|
||||||
return StatusCode::INTERNAL_SERVER_ERROR.into_response();
|
return StatusCode::INTERNAL_SERVER_ERROR.into_response();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if game_version < SUPPORTED_GAME_VERSION {
|
||||||
|
tracing::warn!("{game_version} is below supported game version {SUPPORTED_GAME_VERSION}!");
|
||||||
|
return StatusCode::INTERNAL_SERVER_ERROR.into_response();
|
||||||
|
}
|
||||||
|
|
||||||
// If we are up to date, yay!
|
// If we are up to date, yay!
|
||||||
if game_version == SUPPORTED_GAME_VERSION {
|
if game_version == SUPPORTED_GAME_VERSION {
|
||||||
let mut headers = HeaderMap::new();
|
let mut headers = HeaderMap::new();
|
||||||
|
|
Loading…
Add table
Reference in a new issue