diff --git a/system/libs/validator.php b/system/libs/validator.php index ed416ebd..85ab5400 100644 --- a/system/libs/validator.php +++ b/system/libs/validator.php @@ -180,15 +180,16 @@ class Validator return false; } - $minLength = setting('core.create_character_name_min_length'); - $maxLength = setting('core.create_character_name_max_length'); - // installer doesn't know config.php yet // that's why we need to ignore the nulls - if(is_null($minLength) || is_null($maxLength)) { + if(defined('MYAAC_INSTALL')) { $minLength = 4; $maxLength = 21; } + else { + $minLength = setting('core.create_character_name_min_length'); + $maxLength = setting('core.create_character_name_max_length'); + } $length = strlen($name); if($length < $minLength) @@ -221,16 +222,6 @@ class Validator return false; } - $npcCheck = setting('core.create_character_name_npc_check'); - if ($npcCheck) { - require_once LIBS . 'npc.php'; - NPCS::load(); - if(NPCS::$npcs && in_array(strtolower($name), NPCS::$npcs)) { - self::$lastError = "Invalid name format. Do not use NPC Names"; - return false; - } - } - return true; }