diff options
| author | Fuwn <[email protected]> | 2021-04-27 17:02:09 +0000 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2021-04-27 17:02:09 +0000 |
| commit | fc5c05bce7a5f9d763d72b870717a530dfcf9524 (patch) | |
| tree | a9112c07c3cef656be38715cf143797529fbdbb2 /src/server/cmd | |
| parent | etc: Add a Say Thanks button :) (diff) | |
| download | whirl-fc5c05bce7a5f9d763d72b870717a530dfcf9524.tar.xz whirl-fc5c05bce7a5f9d763d72b870717a530dfcf9524.zip | |
feature: New configuration file format
Diffstat (limited to 'src/server/cmd')
| -rw-r--r-- | src/server/cmd/commands/property/create.rs | 8 | ||||
| -rw-r--r-- | src/server/cmd/commands/room/create.rs | 4 |
2 files changed, 6 insertions, 6 deletions
diff --git a/src/server/cmd/commands/property/create.rs b/src/server/cmd/commands/property/create.rs index 8521a8e..948f434 100644 --- a/src/server/cmd/commands/property/create.rs +++ b/src/server/cmd/commands/property/create.rs @@ -2,7 +2,7 @@ // SPDX-License-Identifier: GPL-3.0-only use crate::{ - config::get_config, + config::Config, server::{ cmd::constants::{PROPUPD, SESSINIT}, net::{ @@ -57,7 +57,7 @@ pub fn create_property_update_as_distributor() -> Vec<u8> { }, NetworkProperty { prop_id: VAR_APPNAME, - value: get_config().unwrap().worldsmaster_username, + value: Config::get().unwrap().whirlsplash.worldsmaster_username, }, ], ) @@ -98,7 +98,7 @@ pub fn create_property_update_as_hub() -> Vec<u8> { }, NetworkProperty { prop_id: VAR_APPNAME, - value: get_config().unwrap().worldsmaster_username, + value: Config::get().unwrap().whirlsplash.worldsmaster_username, }, ], ) @@ -115,7 +115,7 @@ pub fn create_property_request_as_distributor() -> Vec<u8> { }, NetworkProperty { prop_id: VAR_APPNAME, - value: get_config().unwrap().worldsmaster_username, + value: Config::get().unwrap().whirlsplash.worldsmaster_username, }, NetworkProperty { prop_id: VAR_PROTOCOL, diff --git a/src/server/cmd/commands/room/create.rs b/src/server/cmd/commands/room/create.rs index a195936..598d39b 100644 --- a/src/server/cmd/commands/room/create.rs +++ b/src/server/cmd/commands/room/create.rs @@ -3,7 +3,7 @@ use bytes::{BufMut, BytesMut}; -use crate::{config::get_config, server::cmd::constants::REDIRID}; +use crate::{config::Config, server::cmd::constants::REDIRID}; pub fn create_room_id_request(room: &str, room_id: u8) -> Vec<u8> { let mut command = BytesMut::new(); @@ -23,7 +23,7 @@ pub fn create_room_id_request(room: &str, room_id: u8) -> Vec<u8> { for byte in "0.0.0.0".split('.') { command.put_u8(byte.parse::<u8>().unwrap()); } - command.put_u16(get_config().unwrap().hub_port as u16); // Port + command.put_u16(Config::get().unwrap().hub.port as u16); // Port // Length let mut command_as_vec = command.to_vec(); |