Move HELO to actually come from the server

This commit is contained in:
Tangent 2020-05-23 14:24:49 -04:00
parent 3ac90e59b0
commit cf513ace26
3 changed files with 34 additions and 11 deletions
src/net

View file

@ -13,15 +13,18 @@ pub enum ClientMessage<I, S> {
#[derive(Serialize, Debug)]
pub struct Meta {
helo: Option<String>,
version: &'static str,
pub helo: Option<String>,
pub version: &'static str,
}
#[derive(Serialize, Debug)]
#[serde(tag = "t")]
pub enum ServerMessage<I, S> {
#[serde(rename = "m")]
Meta { m: Meta },
Meta {
#[serde(flatten)]
m: Meta,
},
#[serde(rename = "s")]
SetState { u: i8, s: S },
#[serde(rename = "i")]