summaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
authorJokler <jokler.contact@gmail.com>2017-11-16 02:53:05 +0100
committerJokler <jokler.contact@gmail.com>2017-11-16 02:53:05 +0100
commit15e855ddecfdac31ddda26b12fcfd1a142a0ec21 (patch)
treeb06e3bd122f5da69a7418c94e2a07fb4a529f897 /src/plugins
parentcb07b259950d4762ceb609266cd1e8ae0ef60dad (diff)
parentb8c25860ad769a466e7c50bbbb51b653dd55ccfb (diff)
downloadfrippy-0.3.1.tar.gz
frippy-0.3.1.zip
Merge branch 'dev'v0.3.1
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/currency.rs5
-rw-r--r--src/plugins/emoji.rs4
-rw-r--r--src/plugins/help.rs4
3 files changed, 6 insertions, 7 deletions
diff --git a/src/plugins/currency.rs b/src/plugins/currency.rs
index 78ae593..d6cf928 100644
--- a/src/plugins/currency.rs
+++ b/src/plugins/currency.rs
@@ -1,7 +1,6 @@
extern crate reqwest;
extern crate serde;
extern crate serde_json;
-extern crate regex;
use std::io::Read;
use std::num::ParseFloatError;
@@ -131,11 +130,11 @@ impl Plugin for Currency {
false
}
- fn execute(&mut self, _: &IrcServer, _: &Message) -> Result<(), IrcError> {
+ fn execute(&self, _: &IrcServer, _: &Message) -> Result<(), IrcError> {
panic!("Currency does not implement the execute function!")
}
- fn command(&mut self, server: &IrcServer, mut command: PluginCommand) -> Result<(), IrcError> {
+ fn command(&self, server: &IrcServer, mut command: PluginCommand) -> Result<(), IrcError> {
if command.tokens.is_empty() {
return self.invalid_command(server, &command);
diff --git a/src/plugins/emoji.rs b/src/plugins/emoji.rs
index 09d5c27..1bb714c 100644
--- a/src/plugins/emoji.rs
+++ b/src/plugins/emoji.rs
@@ -105,7 +105,7 @@ impl Plugin for Emoji {
}
}
- fn execute(&mut self, server: &IrcServer, message: &Message) -> Result<(), IrcError> {
+ fn execute(&self, server: &IrcServer, message: &Message) -> Result<(), IrcError> {
match message.command {
Command::PRIVMSG(_, ref content) => {
self.emoji(server, content, message.response_target().unwrap())
@@ -114,7 +114,7 @@ impl Plugin for Emoji {
}
}
- fn command(&mut self, server: &IrcServer, command: PluginCommand) -> Result<(), IrcError> {
+ fn command(&self, server: &IrcServer, command: PluginCommand) -> Result<(), IrcError> {
server.send_notice(&command.source,
"This Plugin does not implement any commands.")
}
diff --git a/src/plugins/help.rs b/src/plugins/help.rs
index c4ddcd4..8f3fb4d 100644
--- a/src/plugins/help.rs
+++ b/src/plugins/help.rs
@@ -21,11 +21,11 @@ impl Plugin for Help {
false
}
- fn execute(&mut self, _: &IrcServer, _: &Message) -> Result<(), IrcError> {
+ fn execute(&self, _: &IrcServer, _: &Message) -> Result<(), IrcError> {
panic!("Help does not implement the execute function!")
}
- fn command(&mut self, server: &IrcServer, command: PluginCommand) -> Result<(), IrcError> {
+ fn command(&self, server: &IrcServer, command: PluginCommand) -> Result<(), IrcError> {
self.help(server, command)
}
}