diff options
| author | Jokler <jokler.contact@gmail.com> | 2017-10-09 01:56:04 +0200 |
|---|---|---|
| committer | Jokler <jokler.contact@gmail.com> | 2017-10-11 15:41:32 +0200 |
| commit | f7f86cf06de62598ed635b154c45cdc8fe4e19da (patch) | |
| tree | 8545fe9a45fd61380b9131d0b2f143b6e9500222 /src/plugin.rs | |
| parent | 735f59e3421d9cd9aa908318880467e93af2d788 (diff) | |
| download | frippy-f7f86cf06de62598ed635b154c45cdc8fe4e19da.tar.gz frippy-f7f86cf06de62598ed635b154c45cdc8fe4e19da.zip | |
Add command functionality
Diffstat (limited to 'src/plugin.rs')
| -rw-r--r-- | src/plugin.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/plugin.rs b/src/plugin.rs index fdaad43..62f4fbb 100644 --- a/src/plugin.rs +++ b/src/plugin.rs @@ -1,10 +1,12 @@ 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; fn execute(&mut self, server: &IrcServer, message: &Message) -> Result<(), IrcError>; + fn command(&mut self, server: &IrcServer, command: PluginCommand) -> Result<(), IrcError>; } #[macro_export] |
