diff options
Diffstat (limited to 'server/src/main.rs')
| -rw-r--r-- | server/src/main.rs | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/server/src/main.rs b/server/src/main.rs index cf133203..f1af7c54 100644 --- a/server/src/main.rs +++ b/server/src/main.rs @@ -68,10 +68,12 @@ pub(crate) struct Args { #[arg(long)] upnp: bool, /// Server name - #[cfg(any(feature = "register", feature = "mdns"))] #[arg(long, short = 'N', default_value = "A Hurry Curry! Server")] server_name: String, - /// Uri for connecting remotely for registry submission + /// Message of the day + #[arg(long, short = 'M')] + motd: Option<String>, + /// URI for connecting remotely for registry submission #[cfg(feature = "register")] #[arg(long)] register_uri: Option<String>, @@ -140,6 +142,8 @@ async fn run(data_path: PathBuf, args: Args) -> anyhow::Result<()> { inactivity_timeout: args.inactivity_timeout, lobby: args.lobby, data_path, + motd: args.motd, + name: args.server_name.clone(), }; let mut state = Server::new(config, tx)?; @@ -342,7 +346,7 @@ fn find_data_path() -> Result<PathBuf> { #[cfg(test)] mod test { - use hurrycurry_data::build_data; + use hurrycurry_data::build_gamedata; use hurrycurry_protocol::{Character, PacketS, PlayerClass, PlayerID}; use hurrycurry_server::{ ConnectionID, @@ -376,7 +380,7 @@ mod test { fn map_load() { let mut s = server(); s.load( - build_data(&s.config.data_path, "junior", false).unwrap(), + build_gamedata(&s.config.data_path, "junior", false).unwrap(), None, ); } @@ -384,7 +388,7 @@ mod test { fn map_load_book() { let mut s = server(); s.load( - build_data(&s.config.data_path, "junior", true).unwrap(), + build_gamedata(&s.config.data_path, "junior", true).unwrap(), None, ); } |