diff options
| author | Fuwn <[email protected]> | 2021-04-30 16:31:28 +0000 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2021-04-30 16:31:28 +0000 |
| commit | 04786afcdf3f4df7de30f78a230b92e95797ead2 (patch) | |
| tree | c730a9d1041b4f007d8102194cc7d47437dd5eec /src/server/hub.rs | |
| parent | refactor(makefile): introduce easily configurable `Makefile` variables, document (diff) | |
| download | whirl-04786afcdf3f4df7de30f78a230b92e95797ead2.tar.xz whirl-04786afcdf3f4df7de30f78a230b92e95797ead2.zip | |
feat(hub): *implement* new commands; subscribe room, subscribe distance, teleport
This is NOT the final implementation of these commands, this commit is mearly a preperation for
future implementation.
Diffstat (limited to 'src/server/hub.rs')
| -rw-r--r-- | src/server/hub.rs | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/server/hub.rs b/src/server/hub.rs index ee562d6..8c982ad 100644 --- a/src/server/hub.rs +++ b/src/server/hub.rs @@ -25,6 +25,9 @@ use crate::{ parse::find_property_in_property_list, }, room::{create::create_room_id_request, parse::parse_room_id_request}, + subscribe_distance::parse::parse_subscribe_distance, + subscribe_room::parse::parse_subscribe_room, + teleport::parse::parse_teleport, text::{create::create_text, parse::parse_text, structure::Text}, }, constants::*, @@ -119,6 +122,21 @@ impl Server for Hub { } trace!("broadcasted text to hub"); } + SUBSCRIB => { + let subscribe_room = parse_subscribe_room(msg[3..].to_vec()); + trace!("received subscribe room from {}: {:?}", + username, subscribe_room); + } + SUB_DIST => { + let subscribe_distance = parse_subscribe_distance(msg[3..].to_vec()); + trace!("received subscribe distance from {}: {:?}", + username, subscribe_distance); + } + TELEPORT => { + let teleport = parse_teleport(msg[3..].to_vec()); + trace!("received teleport from {}: {:?}", + username, teleport); + } _ => (), } } |