diff options
| author | Jokler <jokler.contact@gmail.com> | 2018-02-12 19:16:59 +0100 |
|---|---|---|
| committer | Jokler <jokler.contact@gmail.com> | 2018-02-12 19:16:59 +0100 |
| commit | da5c2c8e4893bfb095a8e2122b943c4dca61c41d (patch) | |
| tree | 3bf1e64c4a128e6b0cb5d5172daf1e3398406715 /src/plugins/help.rs | |
| parent | ddf42bc0292b0befe2b2f47f3284d9ffeaf6f4b4 (diff) | |
| download | frippy-da5c2c8e4893bfb095a8e2122b943c4dca61c41d.tar.gz frippy-da5c2c8e4893bfb095a8e2122b943c4dca61c41d.zip | |
Replace is_allowed with a single-threaded execute function
The old execute got renamed to exeute_threaded.
Diffstat (limited to 'src/plugins/help.rs')
| -rw-r--r-- | src/plugins/help.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/plugins/help.rs b/src/plugins/help.rs index 1bb15e1..4dd93d7 100644 --- a/src/plugins/help.rs +++ b/src/plugins/help.rs @@ -13,16 +13,16 @@ impl Help { } impl Plugin for Help { - fn is_allowed(&self, _: &IrcClient, _: &Message) -> bool { - false + fn execute(&self, _: &IrcClient, _: &Message) -> ExecutionStatus { + ExecutionStatus::Done } - fn execute(&self, _: &IrcClient, _: &Message) -> Result<(), IrcError> { - panic!("Help does not implement the execute function!") + fn execute_threaded(&self, _: &IrcClient, _: &Message) -> Result<(), IrcError> { + panic!("Help should not use threading") } - fn command(&self, server: &IrcClient, command: PluginCommand) -> Result<(), IrcError> { - server.send_notice(&command.source, "Help has not been added yet.") + fn command(&self, client: &IrcClient, command: PluginCommand) -> Result<(), IrcError> { + client.send_notice(&command.source, "Help has not been added yet.") } fn evaluate(&self, _: &IrcClient, _: PluginCommand) -> Result<String, String> { |
