@@ -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 |
@@ -196,27 +196,27 @@ |
||
196 | 196 | $allianceContacts = getContacts($allianceID); |
197 | 197 | $corpContacts = getContacts($corpID); |
198 | 198 | foreach ($roles as $role) { |
199 | - if ((@(int)$allianceContacts['standings'] === 5 || @(int)$corpContacts['standings'] === 5) && (string)$role->name === (string)$this->config['plugins']['auth']['standings']['plus5Role']) { |
|
199 | + if ((@(int) $allianceContacts['standings'] === 5 || @(int) $corpContacts['standings'] === 5) && (string) $role->name === (string) $this->config['plugins']['auth']['standings']['plus5Role']) { |
|
200 | 200 | $member->addRole($role); |
201 | 201 | $role = 'blue'; |
202 | 202 | break; |
203 | 203 | } |
204 | - if ((@(int)$allianceContacts['standings'] === 10 || @(int)$corpContacts['standings'] === 10) && (string)$role->name === (string)$this->config['plugins']['auth']['standings']['plus10Role']) { |
|
204 | + if ((@(int) $allianceContacts['standings'] === 10 || @(int) $corpContacts['standings'] === 10) && (string) $role->name === (string) $this->config['plugins']['auth']['standings']['plus10Role']) { |
|
205 | 205 | $member->addRole($role); |
206 | 206 | $role = 'blue'; |
207 | 207 | break; |
208 | 208 | } |
209 | - if ((@(int)$allianceContacts['standings'] === 0 || @(int)$corpContacts['standings'] === 0 || (@(int)$allianceContacts['standings'] && @(int)$corpContacts['standings'] === null || '')) && (string)$role->name === (string)$this->config['plugins']['auth']['standings']['neutralRole']) { |
|
209 | + if ((@(int) $allianceContacts['standings'] === 0 || @(int) $corpContacts['standings'] === 0 || (@(int) $allianceContacts['standings'] && @(int) $corpContacts['standings'] === null || '')) && (string) $role->name === (string) $this->config['plugins']['auth']['standings']['neutralRole']) { |
|
210 | 210 | $member->addRole($role); |
211 | 211 | $role = 'neut'; |
212 | 212 | break; |
213 | 213 | } |
214 | - if ((@(int)$allianceContacts['standings'] === -5 || @(int)$corpContacts['standings'] === -5) && (string)$role->name === (string)$this->config['plugins']['auth']['standings']['minus5Role']) { |
|
214 | + if ((@(int) $allianceContacts['standings'] === -5 || @(int) $corpContacts['standings'] === -5) && (string) $role->name === (string) $this->config['plugins']['auth']['standings']['minus5Role']) { |
|
215 | 215 | $member->addRole($role); |
216 | 216 | $role = 'red'; |
217 | 217 | break; |
218 | 218 | } |
219 | - if ((@(int)$allianceContacts['standings'] === -10 || @(int)$corpContacts['standings'] === -10) && (string)$role->name === (string)$this->config['plugins']['auth']['standings']['minus10Role']) { |
|
219 | + if ((@(int) $allianceContacts['standings'] === -10 || @(int) $corpContacts['standings'] === -10) && (string) $role->name === (string) $this->config['plugins']['auth']['standings']['minus10Role']) { |
|
220 | 220 | $member->addRole($role); |
221 | 221 | $role = 'red'; |
222 | 222 | break; |
@@ -101,7 +101,7 @@ |
||
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); |
@@ -199,20 +199,20 @@ |
||
199 | 199 | |
200 | 200 | //check if user authed based on standings |
201 | 201 | $standings = null; |
202 | - if ((string)$role === 'blue' || 'neut' || 'red') { |
|
202 | + if ((string) $role === 'blue' || 'neut' || 'red') { |
|
203 | 203 | $allianceContacts = getContacts($allianceID); |
204 | 204 | $corpContacts = getContacts($corporationID); |
205 | - if ((string)$role === 'blue' && ($allianceContacts['standings'] || $corpContacts['standings'] === 5 || 10 || '5' || '10')) { |
|
205 | + if ((string) $role === 'blue' && ($allianceContacts['standings'] || $corpContacts['standings'] === 5 || 10 || '5' || '10')) { |
|
206 | 206 | $standings = 1; |
207 | 207 | } |
208 | - if ((string)$role === 'red' && ($allianceContacts['standings'] || $corpContacts['standings'] === -5 || -10 || '-5' || '-10')) { |
|
208 | + if ((string) $role === 'red' && ($allianceContacts['standings'] || $corpContacts['standings'] === -5 || -10 || '-5' || '-10')) { |
|
209 | 209 | $standings = 1; |
210 | 210 | } |
211 | - if ((string)$role === 'neut' && ($allianceContacts['standings'] || $corpContacts['standings'] === 0 || '0' || (@(int)$allianceContacts['standings'] && @(int)$corpContacts['standings'] === null || ''))) { |
|
211 | + if ((string) $role === 'neut' && ($allianceContacts['standings'] || $corpContacts['standings'] === 0 || '0' || (@(int) $allianceContacts['standings'] && @(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."); |