From 7724231ac4511ae3b7c737b51166dbb9e8d8a62c Mon Sep 17 00:00:00 2001 From: Max Audron Date: Sat, 16 Oct 2021 13:48:56 +0200 Subject: move bot initialization out of macro --- macros/src/lib.rs | 9 --------- 1 file changed, 9 deletions(-) (limited to 'macros') diff --git a/macros/src/lib.rs b/macros/src/lib.rs index 2ccd220..7c5ce19 100644 --- a/macros/src/lib.rs +++ b/macros/src/lib.rs @@ -175,15 +175,6 @@ pub fn catinator(tokens: TokenStream) -> TokenStream { use irc::client::prelude::*; use catinator::Bot; - let config_path = env::var("CATINATOR_CONFIG").unwrap_or("config.toml".to_string()); - info!("starting bot with config file {}", config_path); - let mut bot = Bot::new(&config_path).await.unwrap(); - - if bot.config.server.sasl { - info!("initializing sasl"); - bot.sasl_init().await.unwrap() - } - #(#matchers_regex)* info!("starting main event loop"); -- cgit v1.2.3