To: {{ player_email }}
-Subject: Game access link {}
+Subject: Game access link {{ game_name }}
Hi. A user on this Otter game server, with account
{{ account }}
{{ nick }}
If you want that changing, please contact them.
-Regards.
+Regards,
+Otter game server.
From: Otter game server on behalf of <{{ unix_user }}}>
To: {{ player_email }}
-Subject: Game access link {{ name }}
+Subject: Game access link {{ game_name }}
Hi. I'm inviting you to join the game
{{ game_name }}
{{ nick }}
If you want that changing, please contact me.
-Regards.
+Regards,
+{{ unix_user }}, via the Otter game server
unix_user: user,
common,
};
- nwtemplates::render("token-unix", &data)
- }
+ nwtemplates::render("token-unix.tera", &data)
+ },
_ => {
#[derive(Debug,Serialize)]
struct Data<'r> {
account: account.to_string(),
common,
};
- nwtemplates::render("token-other", &data)
- }
+ nwtemplates::render("token-other.tera", &data)
+ },
}.map_err(|e| anyhow!(e.to_string()))
.context("render email template")?;
unsafe {
command.pre_exec(|| {
// https://github.com/rust-lang/rust/issues/79731
- let r = libc::dup2(2,1);
- if r == 0 { Ok(()) }
- else { Err(io::Error::last_os_error()) }
+ match libc::dup2(2,1) {
+ 1 => Ok(()),
+ -1 => Err(io::Error::last_os_error()),
+ x => panic!("dup2(2,1) gave {}", x),
+ }
});
}
let st = command