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

Handle game event change situation in lobby queue

This commit is contained in:
NG (Graham)
2025-07-24 22:17:31 -04:00
parent f48334ef0c
commit 9f90c2e5fb
8 changed files with 96 additions and 7 deletions

View File

@@ -104,6 +104,23 @@ pub struct TypedDevMessage<C> {
pub struct ServerConfig {
pub database: String,
pub auto_signup: bool,
pub queue_mode: QueueChangeMode,
}
pub enum QueueChangeMode {
Upgrade, // move enqueued players into newer gamemode
Notify, // send match change
Ignore, // do nothing
}
impl QueueChangeMode {
pub(super) fn from_persist(persist: crate::persist::settings::QueueMode) -> Self {
match persist {
crate::persist::settings::QueueMode::Upgrade => Self::Upgrade,
crate::persist::settings::QueueMode::Notify => Self::Notify,
crate::persist::settings::QueueMode::Ignore => Self::Ignore,
}
}
}
#[derive(Clone, Debug)]