aboutsummaryrefslogtreecommitdiff
path: root/src/server/auto/cmd
diff options
context:
space:
mode:
authorFuwn <[email protected]>2021-04-26 13:26:53 +0000
committerFuwn <[email protected]>2021-04-26 13:26:53 +0000
commit6bf261e243b11b376a0cbfbe9ab6f9d6cb398aed (patch)
tree326e64552b6223d21feb3cc5b525f792e252ccc1 /src/server/auto/cmd
parentetc: Prepend license identifier to *most* files (diff)
downloadwhirl-6bf261e243b11b376a0cbfbe9ab6f9d6cb398aed.tar.xz
whirl-6bf261e243b11b376a0cbfbe9ab6f9d6cb398aed.zip
etc: Remove legacy server module
Diffstat (limited to 'src/server/auto/cmd')
-rw-r--r--src/server/auto/cmd/mod.rs3
-rw-r--r--src/server/auto/cmd/property.rs24
-rw-r--r--src/server/auto/cmd/room.rs33
-rw-r--r--src/server/auto/cmd/session.rs36
4 files changed, 0 insertions, 96 deletions
diff --git a/src/server/auto/cmd/mod.rs b/src/server/auto/cmd/mod.rs
deleted file mode 100644
index d2345c6..0000000
--- a/src/server/auto/cmd/mod.rs
+++ /dev/null
@@ -1,3 +0,0 @@
-pub mod property;
-pub mod room;
-pub mod session;
diff --git a/src/server/auto/cmd/property.rs b/src/server/auto/cmd/property.rs
deleted file mode 100644
index e266757..0000000
--- a/src/server/auto/cmd/property.rs
+++ /dev/null
@@ -1,24 +0,0 @@
-pub fn create_property_update_command() -> [u8; 147] {
- [
- 0x93, 0xFF, 0x10, 0x1B, 0x80, 0x01, 0x0C, 0x77, 0x6F, 0x72, 0x6C, 0x64, 0x73, 0x33, 0x64, 0x2E,
- 0x63, 0x6F, 0x6D, 0x1A, 0x80, 0x01, 0x12, 0x6D, 0x61, 0x69, 0x6C, 0x2E, 0x77, 0x6F, 0x72, 0x6C,
- 0x64, 0x73, 0x2E, 0x6E, 0x65, 0x74, 0x3A, 0x32, 0x35, 0x19, 0x80, 0x01, 0x28, 0x68, 0x74, 0x74,
- 0x70, 0x3A, 0x2F, 0x2F, 0x77, 0x77, 0x77, 0x2D, 0x64, 0x79, 0x6E, 0x61, 0x6D, 0x69, 0x63, 0x2E,
- 0x75, 0x73, 0x2E, 0x77, 0x6F, 0x72, 0x6C, 0x64, 0x73, 0x2E, 0x6E, 0x65, 0x74, 0x2F, 0x63, 0x67,
- 0x69, 0x2D, 0x62, 0x69, 0x6E, 0x18, 0x80, 0x01, 0x1F, 0x68, 0x74, 0x74, 0x70, 0x3A, 0x2F, 0x2F,
- 0x77, 0x77, 0x77, 0x2D, 0x73, 0x74, 0x61, 0x74, 0x69, 0x63, 0x2E, 0x75, 0x73, 0x2E, 0x77, 0x6F,
- 0x72, 0x6C, 0x64, 0x73, 0x2E, 0x6E, 0x65, 0x74, 0x0F, 0x80, 0x01, 0x01, 0x31, 0x03, 0x80, 0x01,
- 0x02, 0x32, 0x34, 0x01, 0x80, 0x01, 0x0C, 0x57, 0x4F, 0x52, 0x4C, 0x44, 0x53, 0x4D, 0x41, 0x53,
- 0x54, 0x45, 0x52,
- ]: [u8; 147]
-}
-
-pub fn create_property_request_command() -> [u8; 61] {
- [
- 0x3D, 0x01, 0x06, 0x04, 0x01, 0x30, 0x01, 0x0C, 0x57, 0x4F, 0x52, 0x4C, 0x44, 0x53, 0x4D, 0x41,
- 0x53, 0x54, 0x45, 0x52, 0x03, 0x02, 0x32, 0x34, 0x0F, 0x01, 0x31, 0x0A, 0x10,
- // VAR_SERIAL: DWLV000000000000
- 0x44, 0x57, 0x4c, 0x56, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x16, 0x01, 0x30, 0x05, 0x0B, 0x64, 0x69, 0x6D, 0x65, 0x6E, 0x73, 0x69, 0x6F, 0x6E, 0x2D, 0x31,
- ]: [u8; 61]
-}
diff --git a/src/server/auto/cmd/room.rs b/src/server/auto/cmd/room.rs
deleted file mode 100644
index 79786ef..0000000
--- a/src/server/auto/cmd/room.rs
+++ /dev/null
@@ -1,33 +0,0 @@
-pub fn create_room_id_redirect_command(room_name: &str, room_id: usize) -> Vec<u8> {
- let mut room_id_redirect = vec![
- 0x01, // ?
- 0x1A, // Command type
- ];
-
- // room_id_redirect.push(room_id_redirect.len() as u8 + 1); // Data length
- room_id_redirect.push(room_name.len() as u8); // UTF/ room name length
- for i in room_name.bytes() {
- room_id_redirect.push(i);
- } // Push `room_name`
- // for i in "<dimension-1>".bytes() { room_id_redirect.push(i); } // Push room
- // number
-
- // Room number
- room_id_redirect.push(0x00);
- room_id_redirect.push(room_id as u8);
-
- // IP
- room_id_redirect.push(0x00);
- room_id_redirect.push(0x00);
- room_id_redirect.push(0x00);
- room_id_redirect.push(0x00);
-
- // Port
- for byte in 5673_u16.to_be_bytes().iter() {
- room_id_redirect.push(*byte);
- }
-
- room_id_redirect.insert(0, room_id_redirect.len() as u8 + 1); // Data length
-
- room_id_redirect
-}
diff --git a/src/server/auto/cmd/session.rs b/src/server/auto/cmd/session.rs
deleted file mode 100644
index 19969dc..0000000
--- a/src/server/auto/cmd/session.rs
+++ /dev/null
@@ -1,36 +0,0 @@
-use std::str::from_utf8;
-
-use bytes::BytesMut;
-
-use crate::server::cmd::session::SessionInitializationCommand;
-
-struct _SessionInitializationCommandServer {
- pub error: usize,
- pub app_name: String,
- pub protocol: usize,
- pub server_type: usize,
- pub serial: String,
- pub private: usize,
- pub channel: String,
-}
-
-pub fn parse_session_initialization_command(command: BytesMut) -> SessionInitializationCommand {
- SessionInitializationCommand {
- // protocol: command.get(4..4 + command.get(4)).unwrap().to_owned() as usize,
- // client: "".to_string(),
- username: from_utf8(
- command
- .get(21..(20 + command.get(20).unwrap().to_owned() as usize + 1))
- .unwrap(),
- )
- .unwrap()
- .to_string(),
- // password: "".to_string()
- }
-}
-
-// pub fn create_session_initialization_command() ->
-// SessionInitializationCommandServer { SessionInitializationCommandServer {
-//
-// }
-// }