summaryrefslogtreecommitdiffstats
path: root/src/plugins/help.rs
diff options
context:
space:
mode:
authorJokler <jokler.contact@gmail.com>2018-02-23 22:42:56 +0100
committerJokler <jokler.contact@gmail.com>2018-02-23 22:42:56 +0100
commit5278972ee7e980cb6cace8db71d1e1ed8cd07c11 (patch)
treec691517d6d32afff330871262248cf85b7d68439 /src/plugins/help.rs
parent297ceaa0899a6228f47f1f14e4bd261ec4cc6619 (diff)
parent968c837365c4a332fe3c802fd4ecab2562eb4d5a (diff)
downloadfrippy-5278972ee7e980cb6cace8db71d1e1ed8cd07c11.tar.gz
frippy-5278972ee7e980cb6cace8db71d1e1ed8cd07c11.zip
Merge branch 'dev' into factoid-plugin
Diffstat (limited to 'src/plugins/help.rs')
-rw-r--r--src/plugins/help.rs22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/plugins/help.rs b/src/plugins/help.rs
index 7b987d4..4dd93d7 100644
--- a/src/plugins/help.rs
+++ b/src/plugins/help.rs
@@ -1,5 +1,5 @@
use irc::client::prelude::*;
-use irc::error::Error as IrcError;
+use irc::error::IrcError;
use plugin::*;
@@ -10,23 +10,23 @@ impl Help {
pub fn new() -> Help {
Help {}
}
-
- fn help(&self, server: &IrcServer, command: PluginCommand) -> Result<(), IrcError> {
- server.send_notice(&command.source, "Help has not been added yet.")
- }
}
impl Plugin for Help {
- fn is_allowed(&self, _: &IrcServer, _: &Message) -> bool {
- false
+ fn execute(&self, _: &IrcClient, _: &Message) -> ExecutionStatus {
+ ExecutionStatus::Done
+ }
+
+ fn execute_threaded(&self, _: &IrcClient, _: &Message) -> Result<(), IrcError> {
+ panic!("Help should not use threading")
}
- fn execute(&self, _: &IrcServer, _: &Message) -> Result<(), IrcError> {
- panic!("Help does not implement the execute function!")
+ fn command(&self, client: &IrcClient, command: PluginCommand) -> Result<(), IrcError> {
+ client.send_notice(&command.source, "Help has not been added yet.")
}
- fn command(&self, server: &IrcServer, command: PluginCommand) -> Result<(), IrcError> {
- self.help(server, command)
+ fn evaluate(&self, _: &IrcClient, _: PluginCommand) -> Result<String, String> {
+ Err(String::from("Help has not been added yet."))
}
}