@@ -172,7 +172,7 @@ |
||
| 172 | 172 | $this->fuelChannel = $this->toDiscordChannel; |
| 173 | 173 | } |
| 174 | 174 | //Set timer for next key based on number of keys |
| 175 | - $nextKey = (1900 / (int)$this->numberOfKeys) + time(); |
|
| 175 | + $nextKey = (1900 / (int) $this->numberOfKeys) + time(); |
|
| 176 | 176 | $nextKeyTime = gmdate("Y-m-d H:i:s", $nextKey); |
| 177 | 177 | setPermCache("notificationsLastChecked", $nextKey); |
| 178 | 178 | //Set cache timer for api key |
@@ -146,7 +146,7 @@ |
||
| 146 | 146 | $cacheClr = $baseUnix - 13500; |
| 147 | 147 | |
| 148 | 148 | //Set timer for next key based on number of keys |
| 149 | - $nextKey = (1900 / (int)$this->numberOfKeys) + time(); |
|
| 149 | + $nextKey = (1900 / (int) $this->numberOfKeys) + time(); |
|
| 150 | 150 | $nextKeyTime = gmdate("Y-m-d H:i:s", $nextKey); |
| 151 | 151 | setPermCache("mailLastChecked", $nextKey); |
| 152 | 152 | |
@@ -133,7 +133,7 @@ |
||
| 133 | 133 | 'motd' => array( |
| 134 | 134 | 'keyID' => '', //char api keyID (Must have channel on api and mod rights on the char) |
| 135 | 135 | 'vCode' => '', //char api vCode |
| 136 | - 'characterID' => , //ID Of the character with mod rights to the channel, can get this from zkill, look up your char and its /character/#### is your char ID |
|
| 136 | + 'characterID' =>, //ID Of the character with mod rights to the channel, can get this from zkill, look up your char and its /character/#### is your char ID |
|
| 137 | 137 | 'channelname' => '', //name of channel you are requesting, must be IDENTICAL |
| 138 | 138 | ), |
| 139 | 139 | // what channel for eve notifications/also the channel for tq status alerts |
@@ -70,7 +70,7 @@ |
||
| 70 | 70 | $roles = $member->roles; |
| 71 | 71 | foreach ($roles as $role) { |
| 72 | 72 | if (in_array($role->name, $adminRoles, true)) { |
| 73 | - $avatarURL = strtolower((string)$data['messageString']); |
|
| 73 | + $avatarURL = strtolower((string) $data['messageString']); |
|
| 74 | 74 | $ch = curl_init($avatarURL); |
| 75 | 75 | if (substr($avatarURL, -4) === '.jpg') { |
| 76 | 76 | $fp = fopen('/tmp/avatar.jpg', 'wb'); |
@@ -101,7 +101,7 @@ discard block |
||
| 101 | 101 | function characterName($characterID) |
| 102 | 102 | { |
| 103 | 103 | $character = characterDetails($characterID); |
| 104 | - $name = (string)$character['name']; |
|
| 104 | + $name = (string) $character['name']; |
|
| 105 | 105 | if (null === $name || '' === $name) { // Make sure it's always set. |
| 106 | 106 | $url = "https://api.eveonline.com/eve/CharacterName.xml.aspx?ids={$characterID}"; |
| 107 | 107 | $xml = makeApiRequest($url); |
@@ -138,7 +138,7 @@ discard block |
||
| 138 | 138 | // Close the connection |
| 139 | 139 | curl_close($ch); |
| 140 | 140 | $data = json_decode($data, TRUE); |
| 141 | - $id = (int)$data['character'][0]; |
|
| 141 | + $id = (int) $data['character'][0]; |
|
| 142 | 142 | |
| 143 | 143 | } catch (Exception $e) { |
| 144 | 144 | $logger->error('EVE ESI Error: ' . $e->getMessage()); |
@@ -211,7 +211,7 @@ discard block |
||
| 211 | 211 | // Close the connection |
| 212 | 212 | curl_close($ch); |
| 213 | 213 | $data = json_decode($data, TRUE); |
| 214 | - $name = (string)$data['solar_system_name']; |
|
| 214 | + $name = (string) $data['solar_system_name']; |
|
| 215 | 215 | |
| 216 | 216 | } catch (Exception $e) { |
| 217 | 217 | $logger->error('EVE ESI Error: ' . $e->getMessage()); |
@@ -251,7 +251,7 @@ discard block |
||
| 251 | 251 | // Close the connection |
| 252 | 252 | curl_close($ch); |
| 253 | 253 | $data = json_decode($data, TRUE); |
| 254 | - $id = (int)$data['corporation'][0]; |
|
| 254 | + $id = (int) $data['corporation'][0]; |
|
| 255 | 255 | |
| 256 | 256 | } catch (Exception $e) { |
| 257 | 257 | $logger->error('EVE ESI Error: ' . $e->getMessage()); |
@@ -274,7 +274,7 @@ discard block |
||
| 274 | 274 | function corpName($corpID) |
| 275 | 275 | { |
| 276 | 276 | $corporation = corpDetails($corpID); |
| 277 | - $name = (string)$corporation['corporation_name']; |
|
| 277 | + $name = (string) $corporation['corporation_name']; |
|
| 278 | 278 | if (null === $name || '' === $name) { // Make sure it's always set. |
| 279 | 279 | $url = "https://api.eveonline.com/eve/CharacterName.xml.aspx?ids={$corpID}"; |
| 280 | 280 | $xml = makeApiRequest($url); |
@@ -345,7 +345,7 @@ discard block |
||
| 345 | 345 | // Close the connection |
| 346 | 346 | curl_close($ch); |
| 347 | 347 | $data = json_decode($data, TRUE); |
| 348 | - $name = (string)$data['alliance_name']; |
|
| 348 | + $name = (string) $data['alliance_name']; |
|
| 349 | 349 | |
| 350 | 350 | } catch (Exception $e) { |
| 351 | 351 | $logger->error('EVE ESI Error: ' . $e->getMessage()); |
@@ -385,7 +385,7 @@ discard block |
||
| 385 | 385 | // Close the connection |
| 386 | 386 | curl_close($ch); |
| 387 | 387 | $data = json_decode($data, TRUE); |
| 388 | - $id = (int)$data['solarsystem'][0]; |
|
| 388 | + $id = (int) $data['solarsystem'][0]; |
|
| 389 | 389 | |
| 390 | 390 | } catch (Exception $e) { |
| 391 | 391 | $logger->error('EVE ESI Error: ' . $e->getMessage()); |
@@ -424,7 +424,7 @@ discard block |
||
| 424 | 424 | // Close the connection |
| 425 | 425 | curl_close($ch); |
| 426 | 426 | $data = json_decode($data, TRUE); |
| 427 | - $name = (string)$data['name']; |
|
| 427 | + $name = (string) $data['name']; |
|
| 428 | 428 | |
| 429 | 429 | } catch (Exception $e) { |
| 430 | 430 | $logger->error('EVE ESI Error: ' . $e->getMessage()); |
@@ -468,7 +468,7 @@ discard block |
||
| 468 | 468 | $logger->error('Fuzzwork Error: ' . $e->getMessage()); |
| 469 | 469 | return null; |
| 470 | 470 | } |
| 471 | - $id = (int)$data['typeID']; |
|
| 471 | + $id = (int) $data['typeID']; |
|
| 472 | 472 | |
| 473 | 473 | if (null === $id) { // Make sure it's always set. |
| 474 | 474 | $id = 'Unknown'; |
@@ -194,22 +194,22 @@ discard block |
||
| 194 | 194 | $allianceContacts = getContacts($allianceID); |
| 195 | 195 | $corpContacts = getContacts($corpID); |
| 196 | 196 | foreach ($roles as $role) { |
| 197 | - if ((@(int)$allianceContacts['standing'] === 5 || @(int)$corpContacts['standing'] === 5) && (string)$role->name === (string)$this->config['plugins']['auth']['standings']['plus5Role']) { |
|
| 197 | + if ((@(int) $allianceContacts['standing'] === 5 || @(int) $corpContacts['standing'] === 5) && (string) $role->name === (string) $this->config['plugins']['auth']['standings']['plus5Role']) { |
|
| 198 | 198 | $member->addRole($role); |
| 199 | 199 | $role = 'blue'; |
| 200 | 200 | break; |
| 201 | 201 | } |
| 202 | - if ((@(int)$allianceContacts['standing'] === 10 || @(int)$corpContacts['standing'] === 10) && (string)$role->name === (string)$this->config['plugins']['auth']['standings']['plus10Role']) { |
|
| 202 | + if ((@(int) $allianceContacts['standing'] === 10 || @(int) $corpContacts['standing'] === 10) && (string) $role->name === (string) $this->config['plugins']['auth']['standings']['plus10Role']) { |
|
| 203 | 203 | $member->addRole($role); |
| 204 | 204 | $role = 'blue'; |
| 205 | 205 | break; |
| 206 | 206 | } |
| 207 | - if ((@(int)$allianceContacts['standing'] === -5 || @(int)$corpContacts['standing'] === -5) && (string)$role->name === (string)$this->config['plugins']['auth']['standings']['minus5Role']) { |
|
| 207 | + if ((@(int) $allianceContacts['standing'] === -5 || @(int) $corpContacts['standing'] === -5) && (string) $role->name === (string) $this->config['plugins']['auth']['standings']['minus5Role']) { |
|
| 208 | 208 | $member->addRole($role); |
| 209 | 209 | $role = 'red'; |
| 210 | 210 | break; |
| 211 | 211 | } |
| 212 | - if ((@(int)$allianceContacts['standing'] === -10 || @(int)$corpContacts['standing'] === -10) && (string)$role->name === (string)$this->config['plugins']['auth']['standings']['minus10Role']) { |
|
| 212 | + if ((@(int) $allianceContacts['standing'] === -10 || @(int) $corpContacts['standing'] === -10) && (string) $role->name === (string) $this->config['plugins']['auth']['standings']['minus10Role']) { |
|
| 213 | 213 | $member->addRole($role); |
| 214 | 214 | $role = 'red'; |
| 215 | 215 | break; |
@@ -217,7 +217,7 @@ discard block |
||
| 217 | 217 | } |
| 218 | 218 | if ($role === null) { |
| 219 | 219 | foreach ($roles as $role) { |
| 220 | - if ((string)$role->name === (string)$this->config['plugins']['auth']['standings']['neutralRole']) { |
|
| 220 | + if ((string) $role->name === (string) $this->config['plugins']['auth']['standings']['neutralRole']) { |
|
| 221 | 221 | $member->addRole($role); |
| 222 | 222 | $role = 'neut'; |
| 223 | 223 | break; |
@@ -202,17 +202,17 @@ |
||
| 202 | 202 | if ($role === 'blue' || 'neut' || 'red') { |
| 203 | 203 | $allianceContacts = getContacts($allianceID); |
| 204 | 204 | $corpContacts = getContacts($corporationID); |
| 205 | - if ($role === 'blue' && ((int)$allianceContacts['standing'] === 5 || 10 || (int)$corpContacts['standing'] === 5 || 10)) { |
|
| 205 | + if ($role === 'blue' && ((int) $allianceContacts['standing'] === 5 || 10 || (int) $corpContacts['standing'] === 5 || 10)) { |
|
| 206 | 206 | $standings = 1; |
| 207 | 207 | } |
| 208 | - if ($role === 'red' && ((int)$allianceContacts['standing'] === -5 || -10 || (int)$corpContacts['standing'] === -5 || -10)) { |
|
| 208 | + if ($role === 'red' && ((int) $allianceContacts['standing'] === -5 || -10 || (int) $corpContacts['standing'] === -5 || -10)) { |
|
| 209 | 209 | $standings = 1; |
| 210 | 210 | } |
| 211 | - if ($role === 'neut' && ((int)$allianceContacts['standing'] === 0 || (int)$corpContacts['standing'] === 0 || (@(int)$allianceContacts['standings'] === null || '' && @(int)$corpContacts['standings'] === null || ''))) { |
|
| 211 | + if ($role === 'neut' && ((int) $allianceContacts['standing'] === 0 || (int) $corpContacts['standing'] === 0 || (@(int) $allianceContacts['standings'] === null || '' && @(int) $corpContacts['standings'] === null || ''))) { |
|
| 212 | 212 | $standings = 1; |
| 213 | 213 | } |
| 214 | 214 | } |
| 215 | - if (!in_array((int)$allianceID, $allianceArray) && !in_array((int)$corporationID, $corpArray) && null === $standings) { |
|
| 215 | + if (!in_array((int) $allianceID, $allianceArray) && !in_array((int) $corporationID, $corpArray) && null === $standings) { |
|
| 216 | 216 | // Deactivate user in database |
| 217 | 217 | $sql = "UPDATE authUsers SET active='no' WHERE discordID='$discordID'"; |
| 218 | 218 | $this->logger->addInfo("AuthCheck: {$eveName} account has been deactivated as they are no longer in a correct corp/alliance."); |
@@ -139,7 +139,7 @@ |
||
| 139 | 139 | |
| 140 | 140 | $discord->on( |
| 141 | 141 | 'ready', |
| 142 | - function ($discord) use ($logger, $config, $plugins, $pluginsT) { |
|
| 142 | + function($discord) use ($logger, $config, $plugins, $pluginsT) { |
|
| 143 | 143 | // In here we can access any of the WebSocket events. |
| 144 | 144 | // |
| 145 | 145 | // There is a list of event constants that you can |
@@ -89,16 +89,16 @@ |
||
| 89 | 89 | if ($kmGroup['startMail'] > $killID || null === $killID) { |
| 90 | 90 | $killID = $kmGroup['startMail']; |
| 91 | 91 | } |
| 92 | - if ((int)$kmGroup['allianceID'] === 0 & $kmGroup['lossMails'] === 'true') { |
|
| 92 | + if ((int) $kmGroup['allianceID'] === 0 & $kmGroup['lossMails'] === 'true') { |
|
| 93 | 93 | $url = "https://zkillboard.com/api/no-attackers/no-items/orderDirection/asc/afterKillID/{$killID}/corporationID/{$kmGroup['corpID']}/"; |
| 94 | 94 | } |
| 95 | - if ((int)$kmGroup['allianceID'] === 0 & $kmGroup['lossMails'] === 'false') { |
|
| 95 | + if ((int) $kmGroup['allianceID'] === 0 & $kmGroup['lossMails'] === 'false') { |
|
| 96 | 96 | $url = "https://zkillboard.com/api/no-attackers/no-items/kills/orderDirection/asc/afterKillID/{$killID}/corporationID/{$kmGroup['corpID']}/"; |
| 97 | 97 | } |
| 98 | - if ((int)$kmGroup['allianceID'] !== 0 & $kmGroup['lossMails'] === 'true') { |
|
| 98 | + if ((int) $kmGroup['allianceID'] !== 0 & $kmGroup['lossMails'] === 'true') { |
|
| 99 | 99 | $url = "https://zkillboard.com/api/no-attackers/no-items/orderDirection/asc/afterKillID/{$killID}/allianceID/{$kmGroup['allianceID']}/"; |
| 100 | 100 | } |
| 101 | - if ((int)$kmGroup['allianceID'] !== 0 & $kmGroup['lossMails'] === 'false') { |
|
| 101 | + if ((int) $kmGroup['allianceID'] !== 0 & $kmGroup['lossMails'] === 'false') { |
|
| 102 | 102 | $url = "https://zkillboard.com/api/no-attackers/no-items/kills/orderDirection/asc/afterKillID/{$killID}/allianceID/{$kmGroup['allianceID']}/"; |
| 103 | 103 | } |
| 104 | 104 | |