diff --git a/ica-rs/src/py/mod.rs b/ica-rs/src/py/mod.rs index e889a1c..eb3c8d8 100644 --- a/ica-rs/src/py/mod.rs +++ b/ica-rs/src/py/mod.rs @@ -103,7 +103,10 @@ impl PyStatus { pub fn set_status(path: &Path, status: bool) { let cfg = Self::get_config_mut(); cfg.set_status(path, status); - cfg.sync_status_from_config(); + let map = Self::get_map_mut(); + if let Some(plugin) = map.get_mut(path) { + plugin.enabled = status; + } } pub fn display() -> String { diff --git a/ica-rs/src/tailchat.rs b/ica-rs/src/tailchat.rs index 8c4e418..0ae8914 100644 --- a/ica-rs/src/tailchat.rs +++ b/ica-rs/src/tailchat.rs @@ -15,7 +15,7 @@ use tracing::{event, span, Level}; use crate::config::TailchatConfig; use crate::data_struct::tailchat::status::{BotStatus, LoginData}; use crate::error::{ClientResult, TailchatError}; -use crate::{async_any_callback_with_state, async_callback_with_state, StopGetter}; +use crate::{async_any_callback_with_state, async_callback_with_state, version_str, StopGetter}; pub async fn start_tailchat( config: TailchatConfig, @@ -101,7 +101,7 @@ pub async fn start_tailchat( event!(Level::INFO, "发送启动消息到: {}|{}", con, group); let startup_msg = crate::data_struct::tailchat::messages::SendingMessage::new_without_meta( - format!("shenbot v{}-{} 启动成功", crate::VERSION, crate::TAILCHAT_VERSION), + version_str(), con.clone(), Some(group.clone()), );