aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/help.rs
diff options
context:
space:
mode:
authorJokler <jokler.contact@gmail.com>2018-03-04 01:23:39 +0100
committerJokler <jokler.contact@gmail.com>2018-03-04 01:23:39 +0100
commit0c106cc7cec857805227760fd34a4c0f65fc1832 (patch)
tree90fead3112080c963a9f23271dd156af5203c339 /src/plugins/help.rs
parent4468347c9107b6e8d283c0995dcbee47469fb352 (diff)
parent71caa43d6fe4e54722c3d504c29d030255d0f0ee (diff)
downloadfrippy-0c106cc7cec857805227760fd34a4c0f65fc1832.tar.gz
frippy-0c106cc7cec857805227760fd34a4c0f65fc1832.zip
Merge branch 'dev' of github.com:Mavulp/frippy into dev
Diffstat (limited to 'src/plugins/help.rs')
-rw-r--r--src/plugins/help.rs16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/plugins/help.rs b/src/plugins/help.rs
index 4dd93d7..7e3658d 100644
--- a/src/plugins/help.rs
+++ b/src/plugins/help.rs
@@ -1,8 +1,11 @@
use irc::client::prelude::*;
-use irc::error::IrcError;
use plugin::*;
+use error::FrippyError;
+use error::ErrorKind as FrippyErrorKind;
+use failure::ResultExt;
+
#[derive(PluginName, Default, Debug)]
pub struct Help;
@@ -17,18 +20,17 @@ impl Plugin for Help {
ExecutionStatus::Done
}
- fn execute_threaded(&self, _: &IrcClient, _: &Message) -> Result<(), IrcError> {
+ fn execute_threaded(&self, _: &IrcClient, _: &Message) -> Result<(), FrippyError> {
panic!("Help should not use threading")
}
- fn command(&self, client: &IrcClient, command: PluginCommand) -> Result<(), IrcError> {
- client.send_notice(&command.source, "Help has not been added yet.")
+ fn command(&self, client: &IrcClient, command: PluginCommand) -> Result<(), FrippyError> {
+ Ok(client
+ .send_notice(&command.source, "Help has not been added yet.")
+ .context(FrippyErrorKind::Connection)?)
}
fn evaluate(&self, _: &IrcClient, _: PluginCommand) -> Result<String, String> {
Err(String::from("Help has not been added yet."))
}
}
-
-#[cfg(test)]
-mod tests {}