added beginning to !client: command

ive left some comments along side the code as im uncertain as to how messages are being handled now
This commit is contained in:
Mitch161 2020-07-17 19:29:26 +01:00
parent 226bea4623
commit 4031edbf9e
1 changed files with 13 additions and 1 deletions

View File

@ -77,12 +77,24 @@ impl<'a> Client<'a> {
Commands::Info(Some(params)) => {
self.get_stream().write_all(a.to_string().as_bytes());
/* why not do this?
*
* self.transmit_data(a.to_string().as_str());
*/
},
Commands::Disconnect(None) => {
},
Commands::ClientRemove(Some(params)) => {},
Commands::Client(Some(params)) => {},
Commands::Client(Some(params)) => {
let message:String = format!("!client: name:{name} host:{host} uuid:{uuid}", name=params.get("name").unwrap(), host=params.get("host").unwrap(), uuid=params.get("uuid").unwrap());
self.transmit_data(message.as_str());
todo!()
/*
* a success message needs to be read and confirmed
*/
},
Commands::Success(data) => {},
_ => {},
}