forked from jmug/stoatchat
feat: init crond crate
This commit is contained in:
8
Cargo.lock
generated
8
Cargo.lock
generated
@@ -1573,6 +1573,14 @@ dependencies = [
|
||||
"cfg-if",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "crond"
|
||||
version = "0.7.19"
|
||||
dependencies = [
|
||||
"revolt-database",
|
||||
"revolt-files",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "crossbeam-channel"
|
||||
version = "0.5.13"
|
||||
|
||||
@@ -6,6 +6,7 @@ members = [
|
||||
"crates/core/*",
|
||||
"crates/services/*",
|
||||
"crates/bindings/*",
|
||||
"crates/daemons/*",
|
||||
]
|
||||
|
||||
[patch.crates-io]
|
||||
|
||||
@@ -152,7 +152,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));
|
||||
}
|
||||
@@ -293,7 +293,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) {
|
||||
|
||||
14
crates/daemons/crond/Cargo.toml
Normal file
14
crates/daemons/crond/Cargo.toml
Normal 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" }
|
||||
3
crates/daemons/crond/src/main.rs
Normal file
3
crates/daemons/crond/src/main.rs
Normal file
@@ -0,0 +1,3 @@
|
||||
fn main() {
|
||||
println!("Hello, world!");
|
||||
}
|
||||
Reference in New Issue
Block a user