mirror of
https://git.ngram.ca/OpenJam/rc-servers
synced 2026-08-23 23:08:52 +00:00
Move common components to shared lib
This commit is contained in:
1 parent
610f54e236
commit
0e048a17b1
76 files changed
+284
-1110
No files matched your search
@@ -8,8 +8,7 @@ const COSMETIC_CPU_PARAM_KEY: u8 = 176; // out; int
|
||||
|
||||
pub(super) fn player_robot_rank_provider() -> SimpleFunc<79, crate::UserTy, impl (Fn(ParameterTable, &crate::UserTy) -> Result<ParameterTable, i16>) + Sync + Sync> {
|
||||
SimpleFunc::new(|params, user: &crate::UserTy| {
|
||||
let lock = user.read().unwrap();
|
||||
let user = lock.user()?;
|
||||
let user = user.user()?;
|
||||
let mut params = params.to_dict();
|
||||
if let Some(Typed::Str(username)) = params.get(&USERNAME_PARAM_KEY) {
|
||||
log::debug!("Get robot rank for user {}", username.string);
|
||||
|
||||
Reference in new issue
Block a user