made it like 10x faster
This commit is contained in:
parent
cc36c3dce5
commit
7b6b59879e
|
@ -10,9 +10,7 @@ use std::sync::mpsc;
|
||||||
use std::thread;
|
use std::thread;
|
||||||
use std::{env, fs};
|
use std::{env, fs};
|
||||||
|
|
||||||
mod encryption;
|
|
||||||
mod listener_server;
|
mod listener_server;
|
||||||
mod message_stream;
|
|
||||||
mod writer_client;
|
mod writer_client;
|
||||||
|
|
||||||
macro_rules! try_recv {
|
macro_rules! try_recv {
|
||||||
|
@ -35,7 +33,7 @@ fn bytes_to_privmsg_base64(message: Vec<u8>, reciever: &str) -> String {
|
||||||
.encode(message)
|
.encode(message)
|
||||||
.chars()
|
.chars()
|
||||||
.collect::<Vec<char>>()
|
.collect::<Vec<char>>()
|
||||||
.chunks(50)
|
.chunks(500)
|
||||||
.map(|c| c.iter().collect::<String>())
|
.map(|c| c.iter().collect::<String>())
|
||||||
{
|
{
|
||||||
command.push_str(&format!("PRIVMSG {reciever} :{line}\r\n"));
|
command.push_str(&format!("PRIVMSG {reciever} :{line}\r\n"));
|
||||||
|
|
Loading…
Reference in a new issue