diff --git a/system/config.php b/system/config.php index a89a90ff..9186dfeb 100644 --- a/system/config.php +++ b/system/config.php @@ -82,9 +82,4 @@ $config = array( //'Some Quest' => 123, //'Some Quest Two' => 456, ), // quests list (displayed in character view), name => storage - - // other - 'email_lai_sec_interval' => 60, // time in seconds between e-mails to one account from lost account interface, block spam - - 'npc' => array() ); diff --git a/system/pages/account/lost.php b/system/pages/account/lost.php index 95811fb1..664cee9c 100644 --- a/system/pages/account/lost.php +++ b/system/pages/account/lost.php @@ -59,7 +59,7 @@ elseif($action == 'step1' && $action_type == 'email') $minutesleft = floor($insec / 60); $secondsleft = $insec - ($minutesleft * 60); $timeleft = $minutesleft.' minutes '.$secondsleft.' seconds'; - echo 'Account of selected character ('.$nick.') received e-mail in last '.ceil($config['email_lai_sec_interval'] / 60).' minutes. You must wait '.$timeleft.' before you can use Lost Account Interface again.'; + echo 'Account of selected character ('.$nick.') received e-mail in last '.ceil(setting('core.mail_lost_account_interval') / 60).' minutes. You must wait '.$timeleft.' before you can use Lost Account Interface again.'; } } else @@ -104,7 +104,7 @@ elseif($action == 'sendcode') if(_mail($account_mail, $config['lua']['serverName'].' - Recover your account', $mailBody)) { $account->setCustomField('email_code', $newcode); - $account->setCustomField('email_next', (time() + $config['email_lai_sec_interval'])); + $account->setCustomField('email_next', (time() + setting('core.mail_lost_account_interval'))); echo '
Details about steps required to recover your account has been sent to ' . $account_mail . '. You should receive this email within 15 minutes. Please check your inbox/spam directory.'; } else @@ -122,7 +122,7 @@ elseif($action == 'sendcode') $minutesleft = floor($insec / 60); $secondsleft = $insec - ($minutesleft * 60); $timeleft = $minutesleft.' minutes '.$secondsleft.' seconds'; - echo 'Account of selected character ('.$nick.') received e-mail in last '.ceil($config['email_lai_sec_interval'] / 60).' minutes. You must wait '.$timeleft.' before you can use Lost Account Interface again.'; + echo 'Account of selected character ('.$nick.') received e-mail in last '.ceil(setting('core.mail_lost_account_interval') / 60).' minutes. You must wait '.$timeleft.' before you can use Lost Account Interface again.'; } } else diff --git a/system/settings.php b/system/settings.php index 61f90fcf..d31debc6 100644 --- a/system/settings.php +++ b/system/settings.php @@ -533,6 +533,15 @@ Sent by MyAAC,
'mail_enabled', '=', 'true', ], ], + 'mail_lost_account_interval' => [ + 'name' => 'Default Account Premium Days', + 'type' => 'number', + 'desc' => 'Time in seconds between e-mails to one account from lost account interface, block spam', + 'default' => 60, + 'show_if' => [ + 'mail_enabled', '=', 'true', + ], + ], [ 'type' => 'category', 'title' => 'Accounts',