diff options
| author | Jokler <jokler.contact@gmail.com> | 2018-04-27 03:29:59 +0200 |
|---|---|---|
| committer | Jokler <jokler.contact@gmail.com> | 2018-04-27 03:29:59 +0200 |
| commit | 645bb1c2bfaecd1bca3da4b862ecffbd18bf3086 (patch) | |
| tree | 54aa437017cb986b93675b5778dea53001af5cae /src/plugins | |
| parent | 87120d35c1e2ee7eff52e9fd2d0a8458206a4cb6 (diff) | |
| download | frippy-645bb1c2bfaecd1bca3da4b862ecffbd18bf3086.tar.gz frippy-645bb1c2bfaecd1bca3da4b862ecffbd18bf3086.zip | |
Main: Replace the logger with log4rs
Diffstat (limited to 'src/plugins')
| -rw-r--r-- | src/plugins/url.rs | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/plugins/url.rs b/src/plugins/url.rs index a54cabf..1ea6c9c 100644 --- a/src/plugins/url.rs +++ b/src/plugins/url.rs @@ -55,8 +55,7 @@ impl Title { .and_then(|s| s.and_then(|s| s)) .ok_or(ErrorKind::MissingTitle)?; - debug!("delimiters: {:?}", delimiters); - debug!("title: {:?}", title); + debug!("Found title {:?} with delimiters {:?}", title, delimiters); htmlescape::decode_html(title) .map(|t| t.into()) @@ -132,7 +131,7 @@ impl UrlTitles { } else { og_title } - }, + } (Ok(title), _) => title, (_, Ok(title)) => title, (Err(e), _) => Err(e)?, @@ -159,7 +158,7 @@ impl Plugin for UrlTitles { } fn execute_threaded(&self, client: &IrcClient, message: &Message) -> Result<(), FrippyError> { - Ok(match message.command { + match message.command { Command::PRIVMSG(_, ref content) => match self.url(content) { Ok(title) => client .send_privmsg(message.response_target().unwrap(), &title) @@ -167,7 +166,9 @@ impl Plugin for UrlTitles { Err(e) => Err(e).context(FrippyErrorKind::Url)?, }, _ => (), - }) + } + + Ok(()) } fn command(&self, client: &IrcClient, command: PluginCommand) -> Result<(), FrippyError> { |
