hostname
This commit is contained in:
parent
677f5aede7
commit
2cf3c9216b
11
Cargo.lock
generated
11
Cargo.lock
generated
@ -328,6 +328,16 @@ dependencies = [
|
||||
"slab",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "gethostname"
|
||||
version = "0.4.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "0176e0459c2e4a1fe232f984bca6890e681076abb9934f6cea7c326f3fc47818"
|
||||
dependencies = [
|
||||
"libc",
|
||||
"windows-targets 0.48.5",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "gimli"
|
||||
version = "0.28.1"
|
||||
@ -415,6 +425,7 @@ version = "0.1.0"
|
||||
dependencies = [
|
||||
"failure",
|
||||
"futures",
|
||||
"gethostname",
|
||||
"irc",
|
||||
"tokio",
|
||||
]
|
||||
|
@ -10,3 +10,4 @@ irc = "0.15.0"
|
||||
tokio = { version = "1.0.0", features = ["rt", "rt-multi-thread", "macros", "net", "time"] }
|
||||
futures = "0.3.0"
|
||||
failure = "0.1.8"
|
||||
gethostname = "*"
|
@ -7,7 +7,7 @@ use std::process;
|
||||
async fn main() -> Result<(), failure::Error> {
|
||||
// We can also load the Config at runtime via Config::load("path/to/config.toml")
|
||||
let config = Config {
|
||||
nickname: Some("irc-rpc".to_owned()),
|
||||
nickname: Some(gethostname::gethostname().to_str().unwrap().to_owned()),
|
||||
server: Some("irc.ouch.chat".to_owned()),
|
||||
channels: vec!["#testing".to_owned()],
|
||||
..Config::default()
|
||||
|
Loading…
x
Reference in New Issue
Block a user