diff --git a/README.md b/README.md index 1bfc718..061fefd 100644 --- a/README.md +++ b/README.md @@ -58,6 +58,7 @@ max_messages: 100 # chat messages limit -i, --disable-ip-hiding Disable ip hiding -v, --enable-users-ip-viewing Enable users IP viewing -C, --configure Configure client +-a, --disable-auth Disable authentication -h, --help Print help -V, --version Print version ``` diff --git a/src/config.rs b/src/config.rs index 457a05f..7f6c3a2 100644 --- a/src/config.rs +++ b/src/config.rs @@ -173,9 +173,9 @@ pub struct Args { #[arg(short='C', long)] pub configure: bool, - /// Authentication password + /// Disable authentication #[arg(short='a', long)] - pub auth: bool, + pub disable_auth: bool, } pub struct Context { @@ -209,7 +209,7 @@ impl Context { max_messages: config.max_messages, enable_ip_viewing: args.enable_users_ip_viewing || config.enable_ip_viewing, scroll: Arc::new(AtomicUsize::new(0)), - auth: args.auth + auth: !args.disable_auth } } } \ No newline at end of file