[[players]]
account_glob = "server:*"
-#nick = "alice"
-#access = "FixedToken"
-#token = "kmqAKPwK4TfReFjMor8MJhdRPBcwIBpe"
+# USER=rustcargo target/debug/otter --config ~ian/Rustup/Game/server/server.toml --account server: reset --reset-table ~ian/Rustup/Game/server/demo/test.table.toml dummy ~ian/Rustup/Game/server/demo/test.game.toml
-#[[players]]
-#nick = "bob"
-#access = "FixedToken"
-#token = "ccg9kzoTh758QrVE1xMY7BQWB36dNJTx"
+# USER=rustcargo target/debug/otter --config ~ian/Rustup/Game/server/server.toml --super --fixed-token kmqAKPwK4TfReFjMor8MJhdRPBcwIBpe --account server:alice --game-name-account server: join-game dummy
+
+# USER=rustcargo target/debug/otter --config ~ian/Rustup/Game/server/server.toml --account server: library-list wikimedia \*
+
+# USER=rustcargo target/debug/otter --config ~ian/Rustup/Game/server/server.toml --account server: library-add dummy wikimedia chess-\*
impl ConnForGame {
#[throws(AE)]
fn join_game(&mut self, ma: &MainOpts) {
+ let nick = ma.nick.clone()
+ .or_else(|| Some(ma.account.default_nick()));
+
let insns = vec![
- MGI::JoinGame { details: MgmtPlayerDetails { nick: ma.nick.clone() } },
+ MGI::JoinGame { details: MgmtPlayerDetails { nick } },
];
let resp = self.alter_game(insns, None)?;
let account = &cs.current_account()?.notional_account;
let (arecord, acctid) = ag.lookup(account)?;
let (ig, auth) = cs.check_acl(ag, ig, PCH::Instance, &[TP::Play])?;
- let nick = nick.ok_or(ME::ParameterMissing)?;
+ let nick = nick.ok_or(ME::MustSpecifyNick)?;
let logentry = LogEntry {
- html: Html(format!("{} ({}) joined the game",
+ html: Html(format!("{} [{}] joined the game",
&nick, &account)),
};
let timezone = &arecord.timezone
ParseFailed(String),
AuthorisationError,
SuperuserAuthorisationRequired,
- ParameterMissing,
SpecifyAccount,
+ MustSpecifyNick,
AlreadyExists,
NickCollision,
GameBeingDestroyed,