clone saver and esi modifications
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user