diff options
Diffstat (limited to 'src/plugin.rs')
| -rw-r--r-- | src/plugin.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/plugin.rs b/src/plugin.rs index 63d3530..8785708 100644 --- a/src/plugin.rs +++ b/src/plugin.rs @@ -2,19 +2,19 @@ use std::fmt; use irc::client::prelude::*; -use irc::error::Error as IrcError; +use irc::error::IrcError; /// `Plugin` has to be implemented for any struct that should be usable /// as a plugin in frippy. pub trait Plugin: PluginName + Send + Sync + fmt::Debug { /// This should return true if the `Plugin` wants to do work on the message. - fn is_allowed(&self, server: &IrcServer, message: &Message) -> bool; + fn is_allowed(&self, server: &IrcClient, message: &Message) -> bool; /// Handles messages which are not commands but still necessary. - fn execute(&self, server: &IrcServer, message: &Message) -> Result<(), IrcError>; + fn execute(&self, server: &IrcClient, message: &Message) -> Result<(), IrcError>; /// Handles any command directed at this plugin. - fn command(&self, server: &IrcServer, command: PluginCommand) -> Result<(), IrcError>; + fn command(&self, server: &IrcClient, command: PluginCommand) -> Result<(), IrcError>; /// Should work like command but return a String instead of sending messages to IRC. - fn evaluate(&self, server: &IrcServer, command: PluginCommand) -> Result<String, String>; + fn evaluate(&self, server: &IrcClient, command: PluginCommand) -> Result<String, String>; } /// `PluginName` is required by `Plugin`. |
