地球村特供无限制版本

This commit is contained in:
2025-01-26 11:53:01 +08:00
parent 347ec4590d
commit 6861c820bd
2 changed files with 3 additions and 3 deletions

View File

@@ -44,8 +44,8 @@ async fn main() {
let configuration = Configuration::new("config.json");
let configuration_rc = Arc::new(configuration);
let mut spam_file = None;
if configuration_rc.username_prefix().len() > 14 {
error!("Error: Username prefix should not longer than 14");
if configuration_rc.username_prefix().len() > 30 {
error!("Error: Username prefix should not longer than 30");
return;
}
if !configuration_rc.clone().spam_file().is_empty() {

View File

@@ -57,6 +57,6 @@ pub fn generate_string(len_min: i64, len_max: i64) -> String {
pub fn generate_username(config: &Arc<Configuration>) -> String {
config.username_prefix().to_string() + generate_string(
2,16-config.username_prefix().len() as i64
2,32-config.username_prefix().len() as i64
).to_string().as_str()
}