From 4aed403c97e6a8d31b53e1777a8e667af4ccc8f4 Mon Sep 17 00:00:00 2001 From: vanten-s Date: Sat, 21 Oct 2023 12:04:50 +0200 Subject: [PATCH] Got ready for publication --- Cargo.toml | 6 +++++- src/main.rs | 2 +- src/server_handler.rs | 4 ++-- src/writer_client.rs | 2 +- 4 files changed, 9 insertions(+), 5 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 0054292..1f00b2a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,6 +2,10 @@ name = "e2e-irc" version = "3.0.0" edition = "2021" +license = "GPL-3.0" +keywords = ["irc", "encryption"] +description = "An IRC bouncer that can send encrypted messages" +repository = "https://forgejo.vanten-s.com/vanten-s/e2e-irc/" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html @@ -10,7 +14,7 @@ argparse = "0.2.2" base64 = "0.21.4" dirs = "5.0.1" eyre = "0.6.8" -ircparser = { git = "https://forgejo.vanten-s.com/vanten-s/ircparser" } +ircparser-vanten = "0.2.1" openssl = "0.10" pgp = "0.10.2" rand = "0.8.5" diff --git a/src/main.rs b/src/main.rs index c6230a8..9471546 100644 --- a/src/main.rs +++ b/src/main.rs @@ -136,7 +136,7 @@ fn main() -> Result<()> { &writer_channel_rx, &listener_channel_tx, &listener_channel_rx, - &mut state, + &state, ); } Err(error) => match error { diff --git a/src/server_handler.rs b/src/server_handler.rs index 9e7c4f7..da7c391 100644 --- a/src/server_handler.rs +++ b/src/server_handler.rs @@ -26,7 +26,7 @@ pub fn handle_message_from_server( writer_channel_rx: &Receiver, listener_channel_tx: &Sender, _listener_channel_rx: &Receiver, - state: &mut State, + state: &State, ) -> Result<()> { let recieved_parsed = &unwrap_or_return_result!(ircparser::parse(recieved))[0]; @@ -39,7 +39,7 @@ pub fn handle_message_from_server( if recieved_parsed.command != "PRIVMSG" || reciever.starts_with('#') - || state.nicks_without_encryption.contains(&reciever) + || state.nicks_without_encryption.contains(reciever) { forward(recieved, listener_channel_tx, server)?; return Ok(()); diff --git a/src/writer_client.rs b/src/writer_client.rs index d3ae7cd..c38218d 100644 --- a/src/writer_client.rs +++ b/src/writer_client.rs @@ -18,7 +18,7 @@ pub fn write_to_server( let connector = SslConnector::builder(SslMethod::tls()).unwrap().build(); let mut stream = connector - .connect(&server, &tcp_stream) + .connect(server, &tcp_stream) .expect("Couldn't start TLS"); stream