From da5c2c8e4893bfb095a8e2122b943c4dca61c41d Mon Sep 17 00:00:00 2001 From: Jokler Date: Mon, 12 Feb 2018 19:16:59 +0100 Subject: Replace is_allowed with a single-threaded execute function The old execute got renamed to exeute_threaded. --- src/main.rs | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'src/main.rs') diff --git a/src/main.rs b/src/main.rs index 21e27dc..7df8b3b 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,3 +1,6 @@ +#![cfg_attr(feature="clippy", feature(plugin))] +#![cfg_attr(feature="clippy", plugin(clippy))] + extern crate frippy; extern crate time; extern crate irc; @@ -81,10 +84,10 @@ fn main() { for config in configs { let mut disabled_plugins = None; - if let &Some(ref options) = &config.options { + if let Some(ref options) = config.options { if let Some(disabled) = options.get("disabled_plugins") { disabled_plugins = Some(disabled - .split(",") + .split(',') .map(|p| p.trim()) .collect::>()); } @@ -96,11 +99,12 @@ fn main() { bot.add_plugin(plugins::Emoji::new()); bot.add_plugin(plugins::Currency::new()); bot.add_plugin(plugins::KeepNick::new()); + bot.add_plugin(plugins::Tell::new()); if let Some(disabled_plugins) = disabled_plugins { for name in disabled_plugins { - if let None = bot.remove_plugin(name) { - error!("{:?} was not found - could not disable", name); + if bot.remove_plugin(name).is_none() { + error!("\"{}\" was not found - could not disable", name); } } } -- cgit v1.2.3-70-g09d2