예제 #1
1
 /**
  * Execute the console command.
  *
  * @return mixed
  */
 public function fire(Userbot $userbot)
 {
     foreach (config('slack.channels-to-manage') as $channelId) {
         $channel = Channel::findBySlackId($channelId);
         $userbot->manageChannel($channel);
     }
 }
예제 #2
0
 /**
  * Execute the console command.
  *
  * @return mixed
  */
 public function fire(Userbot $userbot, ApiMonkey $api)
 {
     $user = User::create(['char_id' => $this->argument('char_id'), 'char_name' => $api->getCharName($this->argument('char_id')), 'email' => $this->argument('email'), 'password' => Userbot::generatePassword(16), 'next_check' => \Carbon\Carbon::now('UTC')]);
     $userbot->updateSingle($user->char_id);
     $userbot->linkSlackMembers();
     $user->save();
     $this->info('User created and API work done.');
 }
예제 #3
0
 public function handleProviderCallback()
 {
     $char = Socialize::with('eveonline')->user();
     try {
         $user = User::where('char_id', $char->id)->firstOrFail();
     } catch (ModelNotFoundException $e) {
         $user = User::createAndFill(['char_id' => $char->id, 'char_name' => $char->name, 'password' => Userbot::generatePassword(16), 'next_check' => \Carbon\Carbon::now('UTC')]);
     }
     Auth::login($user, true);
     return redirect('home');
 }
예제 #4
0
 /**
  * Execute the console command.
  *
  * @param Userbot $userbot
  *
  * @return mixed
  */
 public function fire(Userbot $userbot)
 {
     $userbot->readNewStandings();
 }
예제 #5
0
 /**
  * Execute the console command.
  *
  * @return mixed
  */
 public function fire(Userbot $userbot)
 {
     $userbot->performUpdates();
     $userbot->linkSlackMembers();
     $userbot->setSlackInactives();
 }
예제 #6
0
 /**
  * Execute the console command.
  *
  * @param Userbot $userbot
  *
  * @return mixed
  */
 public function fire(Userbot $userbot)
 {
     $userbot->performUpdates();
 }
예제 #7
0
 /**
  * Execute the console command.
  *
  * @return mixed
  */
 public function fire(Userbot $userbot)
 {
     $userbot->getNewChannels();
 }
예제 #8
0
 /**
  * Execute the console command.
  *
  * @return mixed
  */
 public function fire(Userbot $userbot)
 {
     //$slack->setName('U04LH952N', '[CVA|CALVU]', 'Rollo');
     //print($api->getAllianceTicker(1988009451)."\n");
     $userbot->checkNames();
 }
예제 #9
0
 /**
  * @param int $charId
  */
 public function sendSingleAffiliation($charId)
 {
     $result = $this->pheal->eveScope->CharacterAffiliation(['ids' => $charId]);
     $this->userbot->updateAffiliations($result);
 }
예제 #10
0
 /**
  * @param $length
  *
  * @return string
  * @throws \Exception
  */
 public static function generatePassword($length)
 {
     return substr(preg_replace("/[^a-zA-Z0-9]/", "", base64_encode(Userbot::getRandomBytes($length + 1))), 0, $length);
 }
예제 #11
0
파일: User.php 프로젝트: Subsparx/jamyl-bot
 /**
  * @param array $charArray
  *
  * @return User
  */
 public static function createAndFill($charArray)
 {
     $user = User::create($charArray);
     $userbot = new Userbot();
     $userbot->updateSingle($charArray['char_id']);
     return $user;
 }
예제 #12
0
 /**
  * Execute the console command.
  *
  * @param Userbot $userbot
  *
  * @return mixed
  */
 public function fire(Userbot $userbot)
 {
     $userbot->linkSlackMembers();
 }
예제 #13
0
 /**
  * Execute the console command.
  *
  * @param Userbot $userbot
  *
  * @return mixed
  */
 public function fire(Userbot $userbot)
 {
     $userbot->setSlackInactives();
 }