clone saver and esi modifications

This commit is contained in:
2019-02-02 23:40:41 -06:00
parent 5d25c76d85
commit 2f2f8e5a29
2 changed files with 32 additions and 0 deletions

View File

@@ -12,6 +12,9 @@ use App\Library\Esi\Mail;
use App\Library\Clones\CloneSaver;
use App\Models\Character\CharacterClone;
use App\Models\Mail\EveMail;
use App\Models\Esi\EsiScope;
use App\Models\Esi\EsiToken;
class RunCloneSaver extends Command
{
@@ -59,6 +62,24 @@ class RunCloneSaver extends Command
$task->SetStopStatus();
}
private function CheckEsiScope() {
//Check the esi scope.
//If the esi scopes are not present then send a mail
$mail = new EveMail;
$mail->sender = 93738489;
$mail->subject = 'Incorrect ESI Scope(s)';
$mail->body = "You don't have the correct ESI Scope(s) registered.<br>" .
"Please register the following scopes:<br>" .
$scopes .
"Sincerely,<br>" .
"Amund Risalo";
$mail->recipient = (int)$charId;
$mail->recipient_type = 'character';
$mail->save();
SendEveMail::dispatch($mail)->delay(Carbon::now()->addMinutes(2));
}
private function CloneSaverMail() {
//Setup time frame job has been sent so we don't send too many mails

View File

@@ -5,6 +5,7 @@ namespace App\Library\Esi;
use DB;
use App\Models\Esi\EsiScope;
use App\Jobs\SendEveMail;
use Seat\Eseye\Cache\NullCache;
use Seat\Eseye\Configuration;
@@ -34,6 +35,16 @@ class Esi {
}
}
$mail = new EveMail;
$mail->sender = 93738489;
$mail->subject = 'W4RP Services - Incorrect ESI Scope';
$mail->body = "Please register on https://services.w4rp.space with the scope: " . $scope;
$mail->recipient = (int)$charId;
$mail->recipient_type = 'character';
$mail->save();
SendEveMail::dispatch($mail)->delay(Carbon::now()->addSeconds(5));
return false;
}