Add basic chat plugin harness (no plugin loading implemented)

This commit is contained in:
NG (Graham) committed 2026-01-13 19:30:07 -05:00
1 parent d04984239c
commit 7224a9b5aa
10 files changed
+125 -2

No files matched your search

+2
View File
@@ -0,0 +1,2 @@
mod plugin;
pub use plugin::{ChatProvider, ChatPlugin};
+8
View File
@@ -0,0 +1,8 @@
pub trait ChatPlugin: crate::Plugin {
fn set_provider(&self, provider: std::sync::Arc<Box<dyn ChatProvider>>);
fn on_message(&self, message: &str, channel: &str, username: &str);
}
pub trait ChatProvider: Send + Sync {
fn send_message(&self, message: &str, channel: &str, username: &str);
}