diff options
| author | Fuwn <[email protected]> | 2021-07-01 00:59:56 -0700 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2021-07-01 00:59:56 -0700 |
| commit | d27615f4cd49cc928fa1d74aa9b93a92623693c9 (patch) | |
| tree | 144c5992542dd9195f4bab37ebf0da860d246e5a | |
| parent | refactor(whirl_server): implement `Clone` for `PropertyList` (diff) | |
| download | whirl-d27615f4cd49cc928fa1d74aa9b93a92623693c9.tar.xz whirl-d27615f4cd49cc928fa1d74aa9b93a92623693c9.zip | |
feat(whirl_server): create the SESSEXIT command
| -rw-r--r-- | crates/whirl_server/src/cmd/commands/mod.rs | 1 | ||||
| -rw-r--r-- | crates/whirl_server/src/cmd/commands/session_exit.rs | 12 |
2 files changed, 13 insertions, 0 deletions
diff --git a/crates/whirl_server/src/cmd/commands/mod.rs b/crates/whirl_server/src/cmd/commands/mod.rs index 884729d..7f8bb4a 100644 --- a/crates/whirl_server/src/cmd/commands/mod.rs +++ b/crates/whirl_server/src/cmd/commands/mod.rs @@ -6,6 +6,7 @@ pub mod buddy_list; pub mod property; pub mod redirect_id; pub mod room_id_request; +pub mod session_exit; pub mod subscribe_distance; pub mod subscribe_room; pub mod teleport; diff --git a/crates/whirl_server/src/cmd/commands/session_exit.rs b/crates/whirl_server/src/cmd/commands/session_exit.rs new file mode 100644 index 0000000..47048ab --- /dev/null +++ b/crates/whirl_server/src/cmd/commands/session_exit.rs @@ -0,0 +1,12 @@ +// Copyright (C) 2021-2021 The Whirlsplash Collective +// SPDX-License-Identifier: GPL-3.0-only + +use crate::{ + cmd::{constants::Command, extendable::Creatable}, + net::property_list::PropertyList, +}; + +pub struct SessionExit(pub PropertyList); +impl Creatable for SessionExit { + fn create(&self) -> Vec<u8> { self.0.clone().as_bytes(Command::SessExit as i32, 0x01) } +} |