aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/emoji.rs
diff options
context:
space:
mode:
authorJokler <jokler.contact@gmail.com>2017-11-16 02:36:12 +0100
committerJokler <jokler.contact@gmail.com>2017-11-16 02:36:12 +0100
commite591ce43d3f9b85572f7ca179799fd6c3191f3ab (patch)
treee3fafbfce1b8f3f3284c4dfb52285c14e60f1921 /src/plugins/emoji.rs
parent4c18f59ac4dfe1372374ecc63a5976ad58a5e272 (diff)
downloadfrippy-e591ce43d3f9b85572f7ca179799fd6c3191f3ab.tar.gz
frippy-e591ce43d3f9b85572f7ca179799fd6c3191f3ab.zip
Remove mutexes around plugins
Mutexes are supposed to only mark critical sections so locking the entire plugin is too general. Any plugins that need mutable data should use mutexes internally instead.
Diffstat (limited to 'src/plugins/emoji.rs')
-rw-r--r--src/plugins/emoji.rs4
1 files changed, 2 insertions, 2 deletions
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.")
}