From ea3cd019142d2276ba9a6a9a3945143b18789873 Mon Sep 17 00:00:00 2001 From: Jokler Date: Mon, 9 Oct 2017 17:25:59 +0200 Subject: Only expose the run function --- src/plugin.rs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src/plugin.rs') diff --git a/src/plugin.rs b/src/plugin.rs index 62f4fbb..3791bf1 100644 --- a/src/plugin.rs +++ b/src/plugin.rs @@ -1,7 +1,6 @@ use std::fmt; use irc::client::prelude::*; use irc::error::Error as IrcError; -use PluginCommand; pub trait Plugin: Send + Sync + fmt::Display + fmt::Debug { fn is_allowed(&self, server: &IrcServer, message: &Message) -> bool; @@ -9,7 +8,13 @@ pub trait Plugin: Send + Sync + fmt::Display + fmt::Debug { fn command(&mut self, server: &IrcServer, command: PluginCommand) -> Result<(), IrcError>; } -#[macro_export] +#[derive(Clone, Debug)] +pub struct PluginCommand { + pub source: String, + pub target: String, + pub tokens: Vec, +} + macro_rules! register_plugin { ($t:ident) => { use std::fmt; -- cgit v1.2.3-70-g09d2