From f57eebc6dcef6daf290374fe88f8dc80a449fe1b Mon Sep 17 00:00:00 2001 From: syui Date: Thu, 7 Mar 2024 06:09:17 +0900 Subject: [PATCH] add host --- .config/ai/scpt | 2 +- src/bot.rs | 13 ++++++++++++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/.config/ai/scpt b/.config/ai/scpt index bd22a13..d02d517 160000 --- a/.config/ai/scpt +++ b/.config/ai/scpt @@ -1 +1 @@ -Subproject commit bd22a134aa736b2f32d414a88f81bdfa084587ec +Subproject commit d02d5175871e46dedad19cc1db44dc9fb7855c4a diff --git a/src/bot.rs b/src/bot.rs index 5e3865d..3419ddc 100644 --- a/src/bot.rs +++ b/src/bot.rs @@ -10,6 +10,7 @@ use crate::reply_link; use crate::data::c_char; use crate::data::data_scpt; +use crate::data::data_toml; use crate::data::log_file; use crate::data::w_cid; use crate::data::Notify; @@ -22,7 +23,7 @@ pub fn c_bot(c: &Context) { notify = notify::get_request(100).await; } let notify: Notify = serde_json::from_str(¬ify).unwrap(); - + let host = data_toml(&"host"); let n = notify.notifications; let length = &n.len(); let su = 0..*length; @@ -145,6 +146,7 @@ pub fn c_bot(c: &Context) { .arg(&uri_root) .arg(&prompt) .arg(&prompt_sub) + .arg(&host) .output() .expect("zsh"); w_cid(cid.to_string(), log_file(&"n1"), true); @@ -162,6 +164,7 @@ pub fn c_bot(c: &Context) { .arg(&uri_root) .arg(&prompt) .arg(&prompt_sub) + .arg(&host) .output() .expect("zsh"); let d = String::from_utf8_lossy(&output.stdout); @@ -182,6 +185,7 @@ pub fn c_bot(c: &Context) { .arg(&uri_root) .arg(&prompt) .arg(&prompt_sub) + .arg(&host) .output() .expect("zsh"); let d = String::from_utf8_lossy(&output.stdout); @@ -231,6 +235,7 @@ pub fn c_bot(c: &Context) { .arg(&uri_root) .arg(&prompt) .arg(&prompt_sub) + .arg(&host) .output() .expect("zsh"); let d = String::from_utf8_lossy(&output.stdout); @@ -262,6 +267,7 @@ pub fn c_bot(c: &Context) { .arg(&uri_root) .arg(&prompt) .arg(&prompt_sub) + .arg(&host) .output() .expect("zsh"); let d = String::from_utf8_lossy(&output.stdout); @@ -293,6 +299,7 @@ pub fn c_bot(c: &Context) { .arg(&uri_root) .arg(&prompt) .arg(&prompt_sub) + .arg(&host) .output() .expect("zsh"); let d = String::from_utf8_lossy(&output.stdout); @@ -322,6 +329,7 @@ pub fn c_bot(c: &Context) { .arg(&uri_root) .arg(&prompt) .arg(&prompt_sub) + .arg(&host) .output() .expect("zsh"); let d = String::from_utf8_lossy(&output.stdout); @@ -353,6 +361,7 @@ pub fn c_bot(c: &Context) { .arg(&uri_root) .arg(&prompt) .arg(&prompt_sub) + .arg(&host) .output() .expect("zsh"); let d = String::from_utf8_lossy(&output.stdout); @@ -385,6 +394,7 @@ pub fn c_bot(c: &Context) { .arg(&uri_root) .arg(&prompt) .arg(&prompt_sub) + .arg(&host) .output() .expect("zsh"); let d = String::from_utf8_lossy(&output.stdout); @@ -412,6 +422,7 @@ pub fn c_bot(c: &Context) { .arg(&uri_root) .arg(&prompt) .arg(&prompt_sub) + .arg(&host) .output() .expect("zsh"); let d = String::from_utf8_lossy(&output.stdout);