From: Ian Jackson Date: Sat, 27 Feb 2021 13:32:03 +0000 (+0000) Subject: rename IPlayer X-Git-Tag: otter-0.4.0~319 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=02fc9affdb46fc715090767687204ff159a97154;p=otter.git rename IPlayer Signed-off-by: Ian Jackson --- diff --git a/daemon/cmdlistener.rs b/daemon/cmdlistener.rs index 31a8621f..2d04c104 100644 --- a/daemon/cmdlistener.rs +++ b/daemon/cmdlistener.rs @@ -345,7 +345,7 @@ fn execute_game_insn<'cs, 'igr, 'ig: 'igr>( layout: arecord.layout, idmap: default(), }; - let ipl = IPlayerState { + let ipl = IPlayer { acctid, tz, tokens_revealed: default(), diff --git a/src/global.rs b/src/global.rs index 0aa5beae..1c37d0c4 100644 --- a/src/global.rs +++ b/src/global.rs @@ -56,12 +56,12 @@ pub struct Instance { pub struct PlayerRecord { pub u: PlayerUpdates, - pub ipl: IPlayerState, + pub ipl: IPlayer, pub account: Arc, } #[derive(Debug,Clone,Serialize,Deserialize)] -pub struct IPlayerState { +pub struct IPlayer { pub acctid: AccountId, pub tokens_revealed: HashMap, pub tz: Timezone, @@ -217,7 +217,7 @@ pub struct InstanceContainer { struct InstanceSaveAccesses { ipieces: PiecesLoadedRef, tokens_players: Vec<(RawTokenStr, PlayerId)>, - aplayers: SecondarySlotMap, + aplayers: SecondarySlotMap, acl: Acl, #[serde(default)] pub links: Arc, } @@ -519,7 +519,7 @@ impl<'ig> InstanceGuard<'ig> { /// caller is responsible for logging; threading it through /// proves the caller has a log entry. #[throws(MgmtError)] - pub fn player_new(&mut self, gnew: GPlayer, inew: IPlayerState, + pub fn player_new(&mut self, gnew: GPlayer, inew: IPlayer, account: Arc, logentry: LogEntry) -> (PlayerId, PreparedUpdateEntry, LogEntry) { // saving is fallible, but we can't attempt to save unless @@ -595,7 +595,7 @@ impl<'ig> InstanceGuard<'ig> { pub fn players_remove(&mut self, old_players_set: &HashSet) -> Result, Option, PreparedUpdateEntry) + (Option, Option, PreparedUpdateEntry) >, InternalError> { // We have to filter this player out of everything diff --git a/src/spec.rs b/src/spec.rs index 5cc24f7f..07682832 100644 --- a/src/spec.rs +++ b/src/spec.rs @@ -470,7 +470,7 @@ pub mod implementation { ag: &AccountsGuard, g: &Instance, gpl: &GPlayer, - ipl: &IPlayerState, + ipl: &IPlayer, token: AccessTokenInfo) -> Result; fn describe_html(&self) -> Html { @@ -486,7 +486,7 @@ pub mod implementation { _ag: &AccountsGuard, _g: &Instance, _gpl: &GPlayer, - _ipl: &IPlayerState, + _ipl: &IPlayer, _token: AccessTokenInfo) -> AccessTokenReport { AccessTokenReport { lines: vec![ "Player access not set, game not accessible to this player" @@ -509,7 +509,7 @@ pub mod implementation { _ag: &AccountsGuard, _g: &Instance, _gpl: &GPlayer, - _ipl: &IPlayerState, + _ipl: &IPlayer, _token: AccessTokenInfo) -> AccessTokenReport { AccessTokenReport { lines: vec![ "Fixed access token".to_string() ] } } @@ -522,7 +522,7 @@ pub mod implementation { _ag: &AccountsGuard, _g: &Instance, _gpl: &GPlayer, - _ipl: &IPlayerState, + _ipl: &IPlayer, token: AccessTokenInfo) -> AccessTokenReport { AccessTokenReport { lines: token.report() } @@ -536,7 +536,7 @@ pub mod implementation { ag: &AccountsGuard, g: &Instance, gpl: &GPlayer, - ipl: &IPlayerState, + ipl: &IPlayer, token: AccessTokenInfo) -> AccessTokenReport { let sendmail = &config().sendmail;