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:
@@ -9,7 +9,7 @@ pub(super) fn all_channels_provider() -> SimpleFunc<11, crate::UserTy, impl (Fn(
|
||||
SimpleFunc::new(|params, _| {
|
||||
let mut params = params.to_dict();
|
||||
params.insert(PARAM_KEY, Typed::Arr(Arr {
|
||||
ty: 104, // hashtable
|
||||
ty: polariton::serdes::TypePrefix::HashMap, // hashtable
|
||||
items: vec![
|
||||
ChatChannelInfo {
|
||||
channel_name: "RE_public_channel0".to_owned(),
|
||||
|
||||
@@ -7,7 +7,7 @@ pub(super) fn ignores_provider() -> SimpleFunc<8, crate::UserTy, impl (Fn(Parame
|
||||
SimpleFunc::new(|params, _| {
|
||||
let mut params = params.to_dict();
|
||||
params.insert(PARAM_KEY, Typed::Arr(Arr {
|
||||
ty: 115, // str
|
||||
ty: polariton::serdes::TypePrefix::Str,
|
||||
items: vec![
|
||||
Typed::Str("Pluto".into()),
|
||||
],
|
||||
|
||||
@@ -7,11 +7,11 @@ impl MoreLobbyAuth {
|
||||
const AUTH_PAYLOAD_KEY: u8 = 245;
|
||||
}
|
||||
|
||||
impl Operation for MoreLobbyAuth {
|
||||
impl <C> Operation<C> for MoreLobbyAuth {
|
||||
type State = ();
|
||||
type User = crate::UserTy;
|
||||
|
||||
fn handle(&self, params: polariton::operation::ParameterTable, _: &mut Self::State, user: &Self::User) -> polariton::operation::OperationResponse {
|
||||
fn handle(&self, params: polariton::operation::ParameterTable<C>, _: &mut Self::State, user: &Self::User) -> polariton::operation::OperationResponse<C> {
|
||||
let params_dict = params.to_dict();
|
||||
if let Some(Typed::Str(auth_payload)) = params_dict.get(&Self::AUTH_PAYLOAD_KEY) {
|
||||
let mut write_lock = user.write().unwrap();
|
||||
|
||||
Reference in New Issue
Block a user