-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add test method for testing sending messages, and fix bf2042 message …
…sender
- Loading branch information
1 parent
f685041
commit f2d94ce
Showing
3 changed files
with
60 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
mod actions; | ||
mod chars; | ||
mod send_keys; | ||
mod shared_main; | ||
mod structs; | ||
|
||
fn main() { | ||
let cfg: structs::SeederConfig = match confy::load_path("config.txt") { | ||
Ok(config) => config, | ||
Err(e) => { | ||
println!("error in config.txt: {}", e); | ||
println!("changing back to default.."); | ||
structs::SeederConfig { | ||
send_messages: true, | ||
message: "testmessage1".into(), | ||
message_start_time_utc: "12:00".into(), | ||
message_stop_time_utc: "23:00".into(), | ||
message_timeout_mins: 8, | ||
} | ||
} | ||
}; | ||
confy::store_path("config.txt", cfg.clone()).unwrap(); | ||
actions::send_message(&cfg, "Battlefield™ 2042"); | ||
} |