1
0
mirror of https://git.ngram.ca/OpenJam/rc-servers synced 2026-08-23 23:08:52 +00:00

Implement non-event part of singleplayer for #7

This commit is contained in:
NGnius (Graham)
2025-03-18 16:47:11 -04:00
parent 792585a031
commit 67c14fe80a
35 changed files with 2127 additions and 17 deletions

View File

@@ -0,0 +1,23 @@
use clap::Parser;
#[derive(Parser, Debug)]
#[command(version, about, long_about = None)]
pub struct CliArgs {
/// TCP port on which to accept connections
#[arg(short, long, default_value_t = 4539)]
pub port: u16,
/// IP Address on which to accept connections
#[arg(long, default_value_t = {"127.0.0.1".to_string()})]
pub ip: String,
/// Handle one connection and then exit
#[arg(short = '1', long)]
pub once: bool,
}
impl CliArgs {
pub fn get() -> Self {
Self::parse()
}
}