Compare commits
No commits in common. "f36d47044c9de704fe39e81e35d5bf290f029bd0" and "516c41be139c996ec895c55b5ddad34958d2743c" have entirely different histories.
f36d47044c
...
516c41be13
5 changed files with 7 additions and 24 deletions
3
.gitmodules
vendored
3
.gitmodules
vendored
|
@ -1,3 +0,0 @@
|
|||
[submodule "irc-stream"]
|
||||
path = irc-stream
|
||||
url = ssh://git@chaostreff-alzey.de:222/Thelie/irc-stream.git
|
10
Cargo.lock
generated
10
Cargo.lock
generated
|
@ -287,14 +287,6 @@ dependencies = [
|
|||
"tokio-util",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "irc_stream"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"futures",
|
||||
"irc-proto",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "itoa"
|
||||
version = "0.4.7"
|
||||
|
@ -350,8 +342,8 @@ checksum = "0ee1c47aaa256ecabcaea351eae4a9b01ef39ed810004e298d2511ed284b1525"
|
|||
name = "mention_2_mail"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"futures",
|
||||
"irc-proto",
|
||||
"irc_stream",
|
||||
"lettre",
|
||||
"native-tls",
|
||||
"toml",
|
||||
|
|
|
@ -8,8 +8,6 @@ edition = "2018"
|
|||
|
||||
[dependencies]
|
||||
irc-proto = "0.15"
|
||||
irc_stream = { path = "irc-stream", version = "0.1" }
|
||||
lettre = "0.9"
|
||||
native-tls = "0.2"
|
||||
toml = "0.5"
|
||||
|
||||
native-tls = "0.2"
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
Subproject commit fea845a5335691b8e75b3981f93ae59335043eb1
|
13
src/main.rs
13
src/main.rs
|
@ -23,7 +23,6 @@ use std::{
|
|||
net::TcpStream,
|
||||
};
|
||||
use irc_proto;
|
||||
use irc_stream::{IrcStream, IrcRead, IrcWrite};
|
||||
use toml::Value;
|
||||
use native_tls::{TlsConnector,TlsStream};
|
||||
|
||||
|
@ -87,18 +86,16 @@ fn main() {
|
|||
// Weird workaround for multitrait dyn pointer
|
||||
// https://github.com/rust-lang/rfcs/issues/2035
|
||||
// would be a charm...
|
||||
trait IrcReadWrite: IrcRead + IrcWrite {}
|
||||
impl<T: IrcRead + IrcWrite> IrcReadWrite for T {}
|
||||
let mut stream: &dyn IrcReadWrite;
|
||||
trait ReadWrite: Read + Write {}
|
||||
impl<T: Read + Write> ReadWrite for T {}
|
||||
let mut stream: &dyn ReadWrite;
|
||||
|
||||
if config["tls"].as_bool().unwrap() == true {
|
||||
stream = &IrcStream::new(connect_irc_tls(&config).unwrap());
|
||||
stream = &connect_irc_tls(&config).unwrap();
|
||||
} else {
|
||||
stream = &IrcStream::new(connect_irc(&config).unwrap());
|
||||
stream = &connect_irc(&config).unwrap();
|
||||
}
|
||||
|
||||
//let irc_stream = IrcStream::new(stream);
|
||||
|
||||
// TODO: Identify with irc server
|
||||
//stream.write(irc_proto.Message{
|
||||
// tags: None,
|
||||
|
|
Loading…
Reference in a new issue