Skip to content
This repository was archived by the owner on Jun 27, 2018. It is now read-only.

Commit 96f3b69

Browse files
Don't hardcode alt nicks
1 parent 5c6883f commit 96f3b69

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/bin/playbot.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -248,11 +248,12 @@ fn main() {
248248
let server = server.as_table().unwrap();
249249

250250
for nick in server["nicks"].as_slice().unwrap() {
251+
let nick = nick.as_str().unwrap();
251252
let server_addr = server["server"].as_str().unwrap();
252253
let conf = Config {
253-
nickname: Some(String::from(nick.as_str().unwrap())),
254+
nickname: Some(String::from(nick)),
254255
nick_password: server.get("password").map(|val| String::from(val.as_str().unwrap())),
255-
alt_nicks: Some(vec!["playbot_".to_owned()]),
256+
alt_nicks: Some(vec![format!("{}_", nick), format!("{}__", nick)]),
256257
should_ghost: Some(true),
257258
ghost_sequence: Some(vec!["RECOVER".to_string()]),
258259
server: Some(String::from(server_addr)),

0 commit comments

Comments
 (0)