summaryrefslogtreecommitdiffstats
path: root/src/plugins/url.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/url.rs')
-rw-r--r--src/plugins/url.rs7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/plugins/url.rs b/src/plugins/url.rs
index af6f36f..6f00466 100644
--- a/src/plugins/url.rs
+++ b/src/plugins/url.rs
@@ -50,7 +50,7 @@ impl Url {
fn url(&self, text: &str) -> Result<String, FrippyError> {
let url = self.grep_url(text).ok_or(UrlError::MissingUrl)?;
- let body = utils::download(self.max_kib, &url)?;
+ let body = utils::download(&url, Some(self.max_kib))?;
Ok(self.get_title(&body).ok_or(UrlError::MissingTitle)?)
}
@@ -72,10 +72,7 @@ impl Plugin for Url {
match message.command {
Command::PRIVMSG(_, ref content) => match self.url(content) {
Ok(title) => client.send_privmsg(message.response_target().unwrap(), &title),
- Err(e) => {
- error!("Url plugin error: {}", e);
- Ok(())
- }
+ Err(e) => Ok(utils::log_error(e)),
},
_ => Ok(()),
}