feat: init crond crate

This commit is contained in:
Paul Makles
2024-11-27 16:56:30 +00:00
parent b9ae333b02
commit acc4317246
5 changed files with 35 additions and 2 deletions

8
Cargo.lock generated
View File

@@ -1573,6 +1573,14 @@ dependencies = [
"cfg-if", "cfg-if",
] ]
[[package]]
name = "crond"
version = "0.7.19"
dependencies = [
"revolt-database",
"revolt-files",
]
[[package]] [[package]]
name = "crossbeam-channel" name = "crossbeam-channel"
version = "0.5.13" version = "0.5.13"

View File

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

View File

@@ -152,7 +152,7 @@ pub static DISCRIMINATOR_SEARCH_SPACE: Lazy<HashSet<String>> = Lazy::new(|| {
.collect::<HashSet<String>>(); .collect::<HashSet<String>>();
for discrim in [ 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)); set.remove(&format!("{:0>4}", discrim));
} }
@@ -293,7 +293,14 @@ impl User {
} }
// Ensure none of the following substrings show up in the username // 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 { for substr in BLOCKED_SUBSTRINGS {
if username_lowercase.contains(substr) { 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!");
}