feat: init crond crate

This commit is contained in:
Paul Makles
2024-11-27 16:56:30 +00:00
committed by Zomatree
parent 4ea08a189d
commit 9a98c53aff
5 changed files with 37 additions and 4 deletions

10
Cargo.lock generated
View File

@@ -1663,6 +1663,16 @@ dependencies = [
[[package]]
name = "crc64fast-nvme"
version = "1.1.1"
name = "crond"
version = "0.7.19"
dependencies = [
"revolt-database",
"revolt-files",
]
[[package]]
name = "crossbeam-channel"
version = "0.5.13"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d5e2ee08013e3f228d6d2394116c4549a6df77708442c62d887d83f68ef2ee37"
dependencies = [

View File

@@ -7,8 +7,7 @@ members = [
"crates/core/*",
"crates/services/*",
"crates/bindings/*",
"crates/daemons/pushd",
"crates/daemons/voice-ingress"
"crates/daemons/*",
]
[patch.crates-io]

View File

@@ -153,7 +153,7 @@ pub static DISCRIMINATOR_SEARCH_SPACE: Lazy<HashSet<String>> = Lazy::new(|| {
.collect::<HashSet<String>>();
for discrim in [
123, 1234, 1111, 2222, 3333, 4444, 5555, 6666, 7777, 8888, 9999,
123, 1234, 1111, 2222, 3333, 4444, 5555, 6666, 7777, 8888, 9999, 1488,
] {
set.remove(&format!("{:0>4}", discrim));
}
@@ -294,7 +294,14 @@ impl User {
}
// Ensure none of the following substrings show up in the username
const BLOCKED_SUBSTRINGS: &[&str] = &["```"];
const BLOCKED_SUBSTRINGS: &[&str] = &[
"```",
"discord.gg",
"rvlt.gg",
"guilded.gg",
"https://",
"http://",
];
for substr in BLOCKED_SUBSTRINGS {
if username_lowercase.contains(substr) {

View File

@@ -0,0 +1,14 @@
[package]
name = "crond"
version = "0.7.19"
license = "AGPL-3.0-or-later"
authors = ["Paul Makles <me@insrt.uk>"]
edition = "2021"
description = "Revolt Daemon Service: Timed data clean up tasks"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
# Core
revolt-database = { version = "0.7.19", path = "../../core/database" }
revolt-files = { version = "0.7.19", path = "../../core/files" }

View File

@@ -0,0 +1,3 @@
fn main() {
println!("Hello, world!");
}