aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/url.rs
diff options
context:
space:
mode:
authorJokler <jokler.contact@gmail.com>2018-02-10 15:25:01 +0100
committerJokler <jokler.contact@gmail.com>2018-02-10 15:25:01 +0100
commit2c10ee57bbefde948b401c36fc50209bc34a99ad (patch)
treea7482e39e3fcfd8efa32460d670503c90de7a3aa /src/plugins/url.rs
parent2ba26a37d27a637b7c0e02970419342a6f83462b (diff)
downloadfrippy-2c10ee57bbefde948b401c36fc50209bc34a99ad.tar.gz
frippy-2c10ee57bbefde948b401c36fc50209bc34a99ad.zip
Upgrade dependencies
Diffstat (limited to 'src/plugins/url.rs')
-rw-r--r--src/plugins/url.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/plugins/url.rs b/src/plugins/url.rs
index ab36833..b980d3e 100644
--- a/src/plugins/url.rs
+++ b/src/plugins/url.rs
@@ -3,7 +3,7 @@ extern crate reqwest;
extern crate select;
use irc::client::prelude::*;
-use irc::error::Error as IrcError;
+use irc::error::IrcError;
use self::regex::Regex;
@@ -126,14 +126,14 @@ impl Url {
}
impl Plugin for Url {
- fn is_allowed(&self, _: &IrcServer, message: &Message) -> bool {
+ fn is_allowed(&self, _: &IrcClient, message: &Message) -> bool {
match message.command {
Command::PRIVMSG(_, ref msg) => RE.is_match(msg),
_ => false,
}
}
- fn execute(&self, server: &IrcServer, message: &Message) -> Result<(), IrcError> {
+ fn execute(&self, server: &IrcClient, message: &Message) -> Result<(), IrcError> {
match message.command {
Command::PRIVMSG(_, ref content) => {
match self.url(content) {
@@ -145,12 +145,12 @@ impl Plugin for Url {
}
}
- fn command(&self, server: &IrcServer, command: PluginCommand) -> Result<(), IrcError> {
+ fn command(&self, server: &IrcClient, command: PluginCommand) -> Result<(), IrcError> {
server.send_notice(&command.source,
"This Plugin does not implement any commands.")
}
- fn evaluate(&self, _: &IrcServer, command: PluginCommand) -> Result<String, String> {
+ fn evaluate(&self, _: &IrcClient, command: PluginCommand) -> Result<String, String> {
self.url(&command.tokens[0]).map_err(|e| String::from(e))
}
}