diff options
| author | Fuwn <[email protected]> | 2021-03-28 15:11:12 +0000 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2021-03-28 15:11:12 +0000 |
| commit | 8da310d3ce1203b474d3a7158ef21b71530305b8 (patch) | |
| tree | 3c73ec1bb3f3e2f0797f1bb7b196adfd9098bfb8 /src/server/cmd | |
| parent | etc: Prepare AutoServer SESSINIT parse function (diff) | |
| download | whirl-8da310d3ce1203b474d3a7158ef21b71530305b8.tar.xz whirl-8da310d3ce1203b474d3a7158ef21b71530305b8.zip | |
Feature: Parse property set command
This is mostly in preparation for avatar support as the function's only purpose is parsing the avatar of the user.
Diffstat (limited to 'src/server/cmd')
| -rw-r--r-- | src/server/cmd/mod.rs | 1 | ||||
| -rw-r--r-- | src/server/cmd/property.rs | 6 |
2 files changed, 7 insertions, 0 deletions
diff --git a/src/server/cmd/mod.rs b/src/server/cmd/mod.rs index 196a7a5..5e5bcd9 100644 --- a/src/server/cmd/mod.rs +++ b/src/server/cmd/mod.rs @@ -1,3 +1,4 @@ pub mod buddy_list; +pub mod property; pub mod session; pub mod text; diff --git a/src/server/cmd/property.rs b/src/server/cmd/property.rs new file mode 100644 index 0000000..eaa4cc1 --- /dev/null +++ b/src/server/cmd/property.rs @@ -0,0 +1,6 @@ +use bytes::BytesMut; +use std::str::from_utf8; + +pub fn parse_property_set_command(command: BytesMut) -> String { + from_utf8(command.get(8..).unwrap()).unwrap().to_string() +} |