1
0
mirror of https://git.ngram.ca/OpenJam/rc-servers synced 2026-08-23 23:08:52 +00:00

Add support for matchmaker sending clients off to game server

This commit is contained in:
NG (Graham)
2025-06-19 22:05:16 -04:00
parent 8cd63c3122
commit 9f74a2e76a
24 changed files with 543 additions and 45 deletions

View File

@@ -54,7 +54,7 @@ pub trait UserAuthenticator {
}
#[async_trait::async_trait]
pub trait User<C>: ChatUser {
pub trait User<C>: ChatUser + LobbyUser {
fn ext(&self, ty: std::any::TypeId) -> Option<&'_ (dyn std::any::Any + Send + Sync + 'static)>;
fn token(&self) -> &'_ super::UserToken;
fn is_mod(&self) -> bool;
@@ -225,3 +225,8 @@ impl SanctionType {
}
}
}
#[async_trait::async_trait]
pub trait LobbyUser {
async fn player_data(&self) -> Result<crate::data::player_data::PlayerData, polariton_server::operations::SimpleOpError>;
}