Compare commits

..

No commits in common. "main" and "garbage" have entirely different histories.

4 changed files with 6 additions and 16 deletions

View file

@ -1,6 +1,6 @@
[package]
name = "mention_2_mail"
version = "0.2.1"
version = "0.2.0"
authors = ["Thelie <git.daniel@mowitz.rocks>"]
edition = "2018"
@ -8,7 +8,7 @@ edition = "2018"
[dependencies]
irc-proto = "0.15"
irc_stream = { path = "irc-stream", version = "0.2" }
irc_stream = { path = "irc-stream", version = "0.1" }
lettre = "0.9"
lettre_email = "0.9"
native-tls = "0.2"

View file

@ -66,13 +66,6 @@ fn parse_server_dir(mut config: Value, server_config_path: PathBuf)
config = merge_config_maps(config, client_config)?;
},
"channels.toml" => {
let channels = Value::from(parse_toml_to_table(entry.path())?);
if config.contains_key(&"channels".to_owned()) {
config[&"channels".to_owned()] = channels;
} else {
config.insert("channels".to_owned(), channels);
}
let channel_config = parse_toml_to_table(entry.path())?;
config = merge_config_maps(config, channel_config)?;
},

View file

@ -27,16 +27,15 @@ use std::{
thread,
};
use lettre::{
Transport,
SmtpClient,
smtp::authentication::{
Credentials,
Mechanism,
},
Transport,
};
use lettre_email::EmailBuilder;
fn main() {
let mut server_conf_flag = false;
let mut config_path = None;
@ -76,12 +75,10 @@ fn main() {
// TODO: This line has many problems…
let (tx,rx): (std::sync::mpsc::Sender<(String, String, String, Vec<Option<[String; 2]>>)>, std::sync::mpsc::Receiver<(String, String, String, Vec<Option<[String; 2]>>)>)= channel();
let mut server_threads = vec![];
for s_conf in server_configs {
let t = tx.clone();
let addr = s_conf.get("server").unwrap().as_str()
.ok_or("Could not get server adress from config").unwrap();
server_threads.push(thread::Builder::new()