summaryrefslogtreecommitdiff
path: root/src/login/login.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/login/login.c')
-rw-r--r--src/login/login.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/login/login.c b/src/login/login.c
index e57293a4c..a8abef1c7 100644
--- a/src/login/login.c
+++ b/src/login/login.c
@@ -931,6 +931,9 @@ int mmo_auth_new(const char* userid, const char* pass, const char sex, const cha
return 3;
}
+ if( login_config.new_acc_length_limit && ( strlen(userid) < 4 || strlen(pass) < 4 ) )
+ return 1;
+
// check for invalid inputs
if( sex != 'M' && sex != 'F' )
return 0; // 0 = Unregistered ID
@@ -1507,6 +1510,7 @@ void login_set_defaults()
safestrncpy(login_config.date_format, "%Y-%m-%d %H:%M:%S", sizeof(login_config.date_format));
login_config.console = false;
login_config.new_account_flag = true;
+ login_config.new_acc_length_limit = true;
login_config.use_md5_passwds = false;
login_config.min_level_to_connect = 0;
login_config.check_client_version = false;
@@ -1565,6 +1569,8 @@ int login_config_read(const char* cfgName)
else if(!strcmpi(w1, "new_account"))
login_config.new_account_flag = (bool)config_switch(w2);
+ else if(!strcmpi(w1, "new_acc_length_limit"))
+ login_config.new_acc_length_limit = (bool)config_switch(w2);
else if(!strcmpi(w1, "start_limited_time"))
login_config.start_limited_time = atoi(w2);
else if(!strcmpi(w1, "check_client_version"))