让代码变得好看,允许玩家自定生成的用户名长度(随机字母部分)
This commit is contained in:
@@ -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
|
||||
config.name_len_limit[0], config.name_len_limit[1]
|
||||
).to_string().as_str()
|
||||
}
|
||||
Reference in New Issue
Block a user