From 96f1f53be79a1ceb51861744b61b70e74c867126 Mon Sep 17 00:00:00 2001 From: ModulatingForce <116608425+modulatingforce@users.noreply.github.com> Date: Sat, 2 Mar 2024 10:07:57 -0500 Subject: [PATCH] (cont) comment cleanup --- src/core/botinstance.rs | 177 ---------------------------------------- 1 file changed, 177 deletions(-) diff --git a/src/core/botinstance.rs b/src/core/botinstance.rs index 9225e48..d9c396b 100644 --- a/src/core/botinstance.rs +++ b/src/core/botinstance.rs @@ -25,183 +25,6 @@ use crate::core::identity::{ChangeResult, IdentityManager, Permissible}; use crate::core::botlog; -// pub mod botlog { - -// /* -// Module intends to add some layers to logging with the module user only requiring to pass : -// - String Log message -// - Option - Code_Module -// - Option - this is used to parse out Chatter & Channel into the logs -// */ -// // use casual_logger::{Level, Log}; -// use casual_logger::Log; -// use twitch_irc::message::PrivmsgMessage; - -// // trace, debug, info, notice, warn, error, fatal - -// /* - -// in main : Log::debug("Checking bot actions", Some("main()".to_string()), None); - -// in log : -// [blalba@timestmp] -// debug = "Checking bot actions", - -// */ -// pub fn trace(in_msg: &str, in_module: Option, in_prvmsg: Option<&PrivmsgMessage>) { -// let (chnl, chatter) = match in_prvmsg { -// Some(prvmsg) => { -// //Log::trace(&format!("(#{}) {}: {}", prvmsg.channel_login, prvmsg.sender.name, prvmsg.message_text)); -// ( -// Some(prvmsg.channel_login.clone()), -// Some(prvmsg.sender.name.clone()), -// ) // <-- Clone fine atm while we're just working with Strings -// } -// None => (None, None), -// }; - -// Log::trace_t( -// in_msg, -// casual_logger::Table::default() // -// .str("Channel", &format!("{:?}", chnl)) -// .str("Chatter", &format!("{:?}", chatter)) -// .str("Code_Module", &format!("{:?}", in_module)), -// ); -// } - -// pub fn debug(in_msg: &str, in_module: Option, in_prvmsg: Option<&PrivmsgMessage>) { -// let (chnl, chatter) = match in_prvmsg { -// Some(prvmsg) => { -// //Log::trace(&format!("(#{}) {}: {}", prvmsg.channel_login, prvmsg.sender.name, prvmsg.message_text)); -// ( -// Some(prvmsg.channel_login.clone()), -// Some(prvmsg.sender.name.clone()), -// ) // <-- Clone fine atm while we're just working with Strings -// } -// None => (None, None), -// }; - -// Log::debug_t( -// in_msg, -// casual_logger::Table::default() // -// .str("Channel", &format!("{:?}", chnl)) -// .str("Chatter", &format!("{:?}", chatter)) -// .str("Code_Module", &format!("{:?}", in_module)), -// ); -// } - -// pub fn info(in_msg: &str, in_module: Option, in_prvmsg: Option<&PrivmsgMessage>) { -// let (chnl, chatter) = match in_prvmsg { -// Some(prvmsg) => { -// //Log::trace(&format!("(#{}) {}: {}", prvmsg.channel_login, prvmsg.sender.name, prvmsg.message_text)); -// ( -// Some(prvmsg.channel_login.clone()), -// Some(prvmsg.sender.name.clone()), -// ) // <-- Clone fine atm while we're just working with Strings -// } -// None => (None, None), -// }; - -// Log::info_t( -// in_msg, -// casual_logger::Table::default() // -// .str("Channel", &format!("{:?}", chnl)) -// .str("Chatter", &format!("{:?}", chatter)) -// .str("Code_Module", &format!("{:?}", in_module)), -// ); -// } - -// pub fn notice(in_msg: &str, in_module: Option, in_prvmsg: Option<&PrivmsgMessage>) { -// let (chnl, chatter) = match in_prvmsg { -// Some(prvmsg) => { -// //Log::trace(&format!("(#{}) {}: {}", prvmsg.channel_login, prvmsg.sender.name, prvmsg.message_text)); -// ( -// Some(prvmsg.channel_login.clone()), -// Some(prvmsg.sender.name.clone()), -// ) // <-- Clone fine atm while we're just working with Strings -// } -// None => (None, None), -// }; - -// Log::notice_t( -// in_msg, -// casual_logger::Table::default() // -// .str("Channel", &format!("{:?}", chnl)) -// .str("Chatter", &format!("{:?}", chatter)) -// .str("Code_Module", &format!("{:?}", in_module)), -// ); -// } - -// pub fn warn(in_msg: &str, in_module: Option, in_prvmsg: Option<&PrivmsgMessage>) { -// let (chnl, chatter) = match in_prvmsg { -// Some(prvmsg) => { -// //Log::trace(&format!("(#{}) {}: {}", prvmsg.channel_login, prvmsg.sender.name, prvmsg.message_text)); -// ( -// Some(prvmsg.channel_login.clone()), -// Some(prvmsg.sender.name.clone()), -// ) // <-- Clone fine atm while we're just working with Strings -// } -// None => (None, None), -// }; - -// Log::warn_t( -// in_msg, -// casual_logger::Table::default() // -// .str("Channel", &format!("{:?}", chnl)) -// .str("Chatter", &format!("{:?}", chatter)) -// .str("Code_Module", &format!("{:?}", in_module)), -// ); -// } - -// pub fn error(in_msg: &str, in_module: Option, in_prvmsg: Option<&PrivmsgMessage>) { -// let (chnl, chatter) = match in_prvmsg { -// Some(prvmsg) => { -// //Log::trace(&format!("(#{}) {}: {}", prvmsg.channel_login, prvmsg.sender.name, prvmsg.message_text)); -// ( -// Some(prvmsg.channel_login.clone()), -// Some(prvmsg.sender.name.clone()), -// ) // <-- Clone fine atm while we're just working with Strings -// } -// None => (None, None), -// }; - -// Log::error_t( -// in_msg, -// casual_logger::Table::default() // -// .str("Channel", &format!("{:?}", chnl)) -// .str("Chatter", &format!("{:?}", chatter)) -// .str("Code_Module", &format!("{:?}", in_module)), -// ); -// } - -// pub fn fatal<'a>( -// in_msg: &'a str, -// in_module: Option, -// in_prvmsg: Option<&PrivmsgMessage>, -// ) -> &'a str { -// let (chnl, chatter) = match in_prvmsg { -// Some(prvmsg) => { -// //Log::trace(&format!("(#{}) {}: {}", prvmsg.channel_login, prvmsg.sender.name, prvmsg.message_text)); -// ( -// Some(prvmsg.channel_login.clone()), -// Some(prvmsg.sender.name.clone()), -// ) // <-- Clone fine atm while we're just working with Strings -// } -// None => (None, None), -// }; - -// Log::fatal_t( -// in_msg, -// casual_logger::Table::default() // -// .str("Channel", &format!("{:?}", chnl)) -// .str("Chatter", &format!("{:?}", chatter)) -// .str("Code_Module", &format!("{:?}", in_module)), -// ); - -// in_msg -// } -// } - #[derive(Debug, PartialEq, Eq, Hash, Clone)] pub enum ChType { Channel(String),