summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/config.rs2
-rw-r--r--src/server/address.rs2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/config.rs b/src/config.rs
index ea1cab1..9e11d27 100644
--- a/src/config.rs
+++ b/src/config.rs
@@ -7,7 +7,7 @@ use crate::Address;
#[structopt(name = "Rustifarm", about = "Asciifarm server in Rust")]
pub struct Config {
- #[structopt(short, long, help="A server type and address. Allowed server types: 'inet', 'unix', 'abstract'. Example: \"inet:127.0.0.1:1234\" or \"abstract:rustifarm\"")]
+ #[structopt(short, long, help="A server type and address. Allowed server types: 'inet', 'unix', 'abstract'. Example: \"inet:127.0.0.1:1234\" or \"abstract:rustifarm\" or \"unix:/tmp/rustifarm\" or \"inet:[::1]:1234\"")]
pub address: Option<Vec<Address>>,
#[structopt(short, long, env="ASCIIFARM_CONTENT_DIR", help="The directory in which the content specifying the world is (maps/encyclopaedia)")]
diff --git a/src/server/address.rs b/src/server/address.rs
index 64aea2d..0fe7c69 100644
--- a/src/server/address.rs
+++ b/src/server/address.rs
@@ -36,7 +36,7 @@ impl FromStr for Address {
let typename = parts[0];
let text = parts[1];
match typename {
- "inet" => Ok(Address::Inet(text.parse()?)),
+ "inet" => Ok(Address::Inet(text.parse().map_err(|e| aerr!("'{}' is not a valid inet address: {}", text, e))?)),
"unix" => Ok(Address::Unix(PathBuf::new().join(text))),
"abstract" => {
if cfg!(target_os = "linux") {