aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugin.rs
diff options
context:
space:
mode:
authorJokler <jokler.contact@gmail.com>2018-02-10 15:25:01 +0100
committerJokler <jokler.contact@gmail.com>2018-02-10 15:25:01 +0100
commit2c10ee57bbefde948b401c36fc50209bc34a99ad (patch)
treea7482e39e3fcfd8efa32460d670503c90de7a3aa /src/plugin.rs
parent2ba26a37d27a637b7c0e02970419342a6f83462b (diff)
downloadfrippy-2c10ee57bbefde948b401c36fc50209bc34a99ad.tar.gz
frippy-2c10ee57bbefde948b401c36fc50209bc34a99ad.zip
Upgrade dependencies
Diffstat (limited to 'src/plugin.rs')
-rw-r--r--src/plugin.rs10
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`.