diff options
| author | Jokler <jokler.contact@gmail.com> | 2018-02-10 14:13:07 +0100 |
|---|---|---|
| committer | Jokler <jokler.contact@gmail.com> | 2018-02-10 14:13:07 +0100 |
| commit | 2ba26a37d27a637b7c0e02970419342a6f83462b (patch) | |
| tree | c7d2323ddf7a0aa58d1b680200dc0acb9dad8558 /src/plugins/help.rs | |
| parent | 1f69bfef7f2fd5fdc8787485d81461d68aa2d3ba (diff) | |
| download | frippy-2ba26a37d27a637b7c0e02970419342a6f83462b.tar.gz frippy-2ba26a37d27a637b7c0e02970419342a6f83462b.zip | |
Add evaluate function to plugins
This allows plugins to be used in combination with each other.
Diffstat (limited to 'src/plugins/help.rs')
| -rw-r--r-- | src/plugins/help.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/plugins/help.rs b/src/plugins/help.rs index 7b987d4..cea325f 100644 --- a/src/plugins/help.rs +++ b/src/plugins/help.rs @@ -10,10 +10,6 @@ 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 { @@ -26,7 +22,11 @@ impl Plugin for Help { } fn command(&self, server: &IrcServer, command: PluginCommand) -> Result<(), IrcError> { - self.help(server, command) + server.send_notice(&command.source, "Help has not been added yet.") + } + + fn evaluate(&self, _: &IrcServer, _: PluginCommand) -> Result<String, String> { + Err(String::from("Help has not been added yet.")) } } |
