aboutsummaryrefslogtreecommitdiff
path: root/crates/whirl_server/src/distributor.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/whirl_server/src/distributor.rs')
-rw-r--r--crates/whirl_server/src/distributor.rs14
1 files changed, 5 insertions, 9 deletions
diff --git a/crates/whirl_server/src/distributor.rs b/crates/whirl_server/src/distributor.rs
index fc07662..1e92089 100644
--- a/crates/whirl_server/src/distributor.rs
+++ b/crates/whirl_server/src/distributor.rs
@@ -24,10 +24,7 @@ use crate::{
commands::{
action::create,
buddy_list::BuddyList,
- property::{
- create::{property_request_as_distributor, property_update_as_distributor},
- parse::find_property_in_property_list,
- },
+ property::create::{property_request_as_distributor, property_update_as_distributor},
redirect_id::RedirectId,
room_id_request::RoomIdRequest,
text::Text,
@@ -36,7 +33,7 @@ use crate::{
extendable::{Creatable, Parsable},
},
interaction::{peer::Peer, shared::Shared},
- net::{constants::VAR_USERNAME, property_parser::parse_network_property},
+ net::constants::VAR_USERNAME,
packet_parser::parse_commands_from_packet,
Server,
};
@@ -73,10 +70,9 @@ impl Server for Distributor {
trace!("sent property update to client");
}
Some(Command::SessInit) => {
- username = (&*find_property_in_property_list(
- &parse_network_property(msg[3..].to_vec()),
- VAR_USERNAME,
- ).value).to_string();
+ username = (*crate::net::property_list::PropertyList::from_bytes(msg[3..]
+ .to_vec())
+ .find(VAR_USERNAME)).value.to_string();
debug!("received session initialization from {}", username);