mirror of
https://git.ngram.ca/OpenJam/rc-servers
synced 2026-08-23 23:08:52 +00:00
Update to work with polariton v0.2
This commit is contained in:
@@ -4,11 +4,11 @@ use polariton_server::operations::{Operation, OperationCode};
|
||||
|
||||
pub struct MaintenanceModeTeller;
|
||||
|
||||
impl Operation for MaintenanceModeTeller {
|
||||
impl <C> Operation<C> for MaintenanceModeTeller {
|
||||
type State = ();
|
||||
type User = crate::UserTy;
|
||||
|
||||
fn handle(&self, _: polariton::operation::ParameterTable, _: &mut Self::State, _: &Self::User) -> polariton::operation::OperationResponse {
|
||||
fn handle(&self, _: polariton::operation::ParameterTable<C>, _: &mut Self::State, _: &Self::User) -> polariton::operation::OperationResponse<C> {
|
||||
let mut resp_params = HashMap::new();
|
||||
resp_params.insert(20 /* is in maintenance mode? */, polariton::operation::Typed::Bool(false.into()));
|
||||
resp_params.insert(19 /* maintenace mode message */, polariton::operation::Typed::Str("OpenJam's servers are currently undergoing maintenance".into()));
|
||||
|
||||
Reference in New Issue
Block a user