mirror of
https://git.ngram.ca/OpenJam/rc-servers
synced 2026-08-23 23:08:52 +00:00
Add social server and implement all op codes up until chat room connection blocks further requests
This commit is contained in:
1 parent
d8885d811f
commit
2907376722
76 files changed
+3052
-7
No files matched your search
@@ -0,0 +1,20 @@
|
||||
use polariton_server::operations::SimpleFunc;
|
||||
use polariton::operation::{ParameterTable, Typed};
|
||||
|
||||
const DAYS_PARAM_KEY: u8 = 8;
|
||||
const HOURS_PARAM_KEY: u8 = 13;
|
||||
const MINUTES_PARAM_KEY: u8 = 14;
|
||||
const SECONDS_PARAM_KEY: u8 = 15;
|
||||
const LIFETIME_PARAM_KEY: u8 = 150;
|
||||
|
||||
pub(super) fn premium_remaining_provider() -> SimpleFunc<15, crate::UserTy, impl (Fn(ParameterTable, &crate::UserTy) -> Result<ParameterTable, i16>) + Sync + Sync> {
|
||||
SimpleFunc::new(|params, _| {
|
||||
let mut params = params.to_dict();
|
||||
params.insert(DAYS_PARAM_KEY, Typed::Int(0));
|
||||
params.insert(HOURS_PARAM_KEY, Typed::Int(0));
|
||||
params.insert(MINUTES_PARAM_KEY, Typed::Int(0));
|
||||
params.insert(SECONDS_PARAM_KEY, Typed::Int(0));
|
||||
params.insert(LIFETIME_PARAM_KEY, Typed::Bool(false.into()));
|
||||
Ok(params.into())
|
||||
})
|
||||
}
|
||||
Reference in new issue
Block a user