added some color

This commit is contained in:
legitnull 2023-02-19 16:42:34 -07:00
parent e3d403f49f
commit 8aec8d19d3
2 changed files with 7 additions and 3 deletions

@ -14,12 +14,13 @@ mod modules {
pub mod ai; pub mod ai;
pub mod invade; pub mod invade;
pub mod test; pub mod test;
pub mod ai_invade;
} }
use modules::ai::Ai; // FIX THIS BS use modules::ai::Ai; // FIX THIS BS
use modules::ping::PingCommand; use modules::ping::PingCommand;
use modules::invade::InvadeCommand; use modules::invade::InvadeCommand;
//use modules::test::TestCommand; //use modules::ai_invade::AiInvadeCommand;
use modules::kill::KillCommand; // ... use modules::kill::KillCommand; // ...
use crate::modules::Command; use crate::modules::Command;
@ -86,6 +87,8 @@ fn main() {
let ping_command = PingCommand; let ping_command = PingCommand;
let kill_command = KillCommand; let kill_command = KillCommand;
let invade_command = InvadeCommand; let invade_command = InvadeCommand;
//let ai_invade_command = AiInvadeCommand;
//let test_command = TestCommand; //let test_command = TestCommand;
let ai = Ai; let ai = Ai;
@ -109,8 +112,8 @@ fn main() {
for response in invade_command.handle(message) { for response in invade_command.handle(message) {
ssl_stream.write_all(response.as_bytes()).unwrap(); ssl_stream.write_all(response.as_bytes()).unwrap();
} }
} //else if message.contains(":%test") { } //else if message.contains(":%aiinvade") {
// for response in test_command.handle(message) { // for response in ai_invade_command.handle(message) {
// ssl_stream.write_all(response.as_bytes()).unwrap(); // ssl_stream.write_all(response.as_bytes()).unwrap();
// } // }
//} //}

@ -13,6 +13,7 @@ struct Config {
invaders: Vec<String>, invaders: Vec<String>,
server: String, server: String,
port: u16, port: u16,
} }
pub struct InvadeCommand; pub struct InvadeCommand;