aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorFuwn <[email protected]>2021-03-28 15:11:12 -0700
committerFuwn <[email protected]>2021-03-28 15:11:12 -0700
commite175ad06930bec510739fe661d6c6d81ec0aaaf8 (patch)
tree1a8b61b517daf163cf2472295e802215b9fdb967 /src
parentetc: Prepare AutoServer SESSINIT parse function (diff)
downloadwhirl-e175ad06930bec510739fe661d6c6d81ec0aaaf8.tar.xz
whirl-e175ad06930bec510739fe661d6c6d81ec0aaaf8.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')
-rw-r--r--src/server/cmd/mod.rs1
-rw-r--r--src/server/cmd/property.rs6
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()
+}