This commit is contained in:
ModulatingForce 2024-03-23 19:37:43 -04:00
parent 0e12cd1bff
commit 22b2ec746a
2 changed files with 49 additions and 17 deletions

View file

@ -161,6 +161,18 @@ impl BotInstance {
while let Some(message) = msglock.recv().await { while let Some(message) = msglock.recv().await {
botlog::trace(
format!(
"[TRACE][ServerMessage] > {:?}",
message
)
.as_str(),
Some("BotInstance > runner()".to_string()),
None,
);
match message { match message {
ServerMessage::Notice(msg) => { ServerMessage::Notice(msg) => {
botlog::notice( botlog::notice(

View file

@ -157,26 +157,16 @@ async fn sayout(bot: BotAR, msg: PrivmsgMessage) {
*/ */
let newoutmsg = if let Some(srcmsg) = reply_parent {
if let Some(srcmsg) = reply_parent { format!("{} from #{} says {} . Replying to: {} : {}",
msg.sender.name,msg.channel_login,outmsg, reply_parent_usr.unwrap(),srcmsg)
let newoutmsg = format!("{} from #{} Shared >> {} : {}", } else {
msg.sender.name,msg.channel_login, reply_parent_usr.unwrap(),srcmsg); format!("{} from #{} says : {}",
msg.sender.name,msg.channel_login, outmsg)
// uses chat.say_in_reply_to() for the bot controls for messages };
botlock
.botmgrs
.chat
.say(trgchnl.to_string(), newoutmsg.to_string())
.await;
}
let newoutmsg = format!("{} from #{} says : {}",
msg.sender.name,msg.channel_login, outmsg);
// uses chat.say_in_reply_to() for the bot controls for messages // uses chat.say_in_reply_to() for the bot controls for messages
botlock botlock
.botmgrs .botmgrs
@ -184,6 +174,36 @@ async fn sayout(bot: BotAR, msg: PrivmsgMessage) {
.say(trgchnl.to_string(), newoutmsg.to_string()) .say(trgchnl.to_string(), newoutmsg.to_string())
.await; .await;
// if let Some(srcmsg) = reply_parent {
// let newoutmsg = format!("{} from #{} Shared >> {} : {}",
// msg.sender.name,msg.channel_login, reply_parent_usr.unwrap(),srcmsg);
// // uses chat.say_in_reply_to() for the bot controls for messages
// botlock
// .botmgrs
// .chat
// .say(trgchnl.to_string(), newoutmsg.to_string())
// .await;
// }
// let newoutmsg = format!("{} from #{} says : {}",
// msg.sender.name,msg.channel_login, outmsg);
// // uses chat.say_in_reply_to() for the bot controls for messages
// botlock
// .botmgrs
// .chat
// .say(trgchnl.to_string(), newoutmsg.to_string())
// .await;
// botlog::debug( // botlog::debug(
// "Sayout had issues trying to parse arguments", // "Sayout had issues trying to parse arguments",
// Some("experiment002 > sayout".to_string()), // Some("experiment002 > sayout".to_string()),