diff options
| author | Jokler <jokler.contact@gmail.com> | 2018-02-12 19:16:59 +0100 |
|---|---|---|
| committer | Jokler <jokler.contact@gmail.com> | 2018-02-12 19:16:59 +0100 |
| commit | da5c2c8e4893bfb095a8e2122b943c4dca61c41d (patch) | |
| tree | 3bf1e64c4a128e6b0cb5d5172daf1e3398406715 /src/main.rs | |
| parent | ddf42bc0292b0befe2b2f47f3284d9ffeaf6f4b4 (diff) | |
| download | frippy-da5c2c8e4893bfb095a8e2122b943c4dca61c41d.tar.gz frippy-da5c2c8e4893bfb095a8e2122b943c4dca61c41d.zip | |
Replace is_allowed with a single-threaded execute function
The old execute got renamed to exeute_threaded.
Diffstat (limited to 'src/main.rs')
| -rw-r--r-- | src/main.rs | 12 |
1 files changed, 8 insertions, 4 deletions
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::<Vec<_>>()); } @@ -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); } } } |
