--- a/rust/hedgewars-checker/Cargo.toml Wed Oct 24 21:07:26 2018 +0200
+++ b/rust/hedgewars-checker/Cargo.toml Wed Oct 24 21:52:19 2018 +0200
@@ -1,6 +1,6 @@
[package]
name = "hedgewars-checker"
-version = "0.1.0"
+version = "1.0.0"
authors = ["Andrey Korotaev <a.korotaev@hedgewars.org>"]
[dependencies]
--- a/rust/hedgewars-checker/src/main.rs Wed Oct 24 21:07:26 2018 +0200
+++ b/rust/hedgewars-checker/src/main.rs Wed Oct 24 21:52:19 2018 +0200
@@ -154,6 +154,18 @@
} else if msg[..].starts_with(b"BYE") {
warn!("Received BYE: {}", String::from_utf8_lossy(&msg[..]));
return Ok(());
+ } else if msg[..].starts_with(b"CHAT") {
+ let body = String::from_utf8_lossy(&msg[5..]);
+ let mut l = body.lines();
+ info!("Chat [{}]: {}", l.next().unwrap(), l.next().unwrap());
+ } else if msg[..].starts_with(b"ROOM") {
+ let body = String::from_utf8_lossy(&msg[5..]);
+ let mut l = body.lines();
+ if let Some(action) = l.next() {
+ if action == "ADD" {
+ info!("Room added: {}", l.skip(1).next().unwrap());
+ }
+ }
} else if msg[..].starts_with(b"ERROR") {
warn!("Received ERROR: {}", String::from_utf8_lossy(&msg[..]));
return Ok(());