• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Modern AAC - Resitricted names BUG!

HeberPcL

[PowerOT.com.br]
Joined
Aug 21, 2007
Messages
1,292
Reaction score
51
Location
Brazil
GitHub
heberpcl
/*Resitricted names*/
PHP:
$config['restricted_names'] = array("god", "gamemaster", "admin", "account manager");

Not restricting the specified names.

i search in files:
system/application/controllers/character.php
PHP:
				if(in_array(strtolower($unit), $config['invalidNameTags'])) {
					$this->form_validation->set_message('_validName', 'Invalid Name');
					return false;
				}
                  // i add this..
				else if(in_array($unit, $config['restricted_names'])) {
					$this->form_validation->set_message('_validName', 'Invalid Name');
					return false;
				}
 
PHP:
if(in_array(strtolower($unit), $config['invalidNameTags']) || in_array(strtolower($unit), $config['restricted_names']))
{
     $this->form_validation->set_message('_validName', 'Invalid Name');
     return false;
}
 
Either your $unit is not getting the inserted names properly, or your form_validation is not working properly.

Also, I believe its better to have your code looking like this:

PHP:
if(in_array(strtolower($unit), $config['invalidNameTags'], TRUE) || in_array(strtolower($unit), $config['restricted_names'], TRUE))
{
     $this->form_validation->set_message('_validName', 'Invalid Name');
     return false;
}
 
Back
Top