地球村特供无限制版本
This commit is contained in:
@@ -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() {
|
||||
|
||||
@@ -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()
|
||||
}
|
||||
Reference in New Issue
Block a user