@@ -91,7 +91,7 @@ |
||
| 91 | 91 | */ |
| 92 | 92 | public function setCredential(User $user, $factor, $data) |
| 93 | 93 | { |
| 94 | - $issuer = 'ACC - ' . $this->getConfiguration()->getIrcNotificationsInstance(); |
|
| 94 | + $issuer = 'ACC - '.$this->getConfiguration()->getIrcNotificationsInstance(); |
|
| 95 | 95 | $totp = TOTP::create(); |
| 96 | 96 | $totp->setLabel($user->getUsername()); |
| 97 | 97 | $totp->setIssuer($issuer); |
@@ -10,10 +10,10 @@ |
||
| 10 | 10 | { |
| 11 | 11 | $output = $input; |
| 12 | 12 | |
| 13 | - if(filter_var($input, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4) !== false){ |
|
| 13 | + if (filter_var($input, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4) !== false) { |
|
| 14 | 14 | $octets = explode('.', $input); |
| 15 | 15 | $output = ''; |
| 16 | - foreach ($octets as $octet){ |
|
| 16 | + foreach ($octets as $octet) { |
|
| 17 | 17 | $output .= str_pad(dechex($octet), 2, '0', STR_PAD_LEFT); |
| 18 | 18 | } |
| 19 | 19 | |
@@ -89,7 +89,7 @@ discard block |
||
| 89 | 89 | $blacklist = array("DCC", "CCTP", "PRIVMSG"); |
| 90 | 90 | $message = str_replace($blacklist, "(IRC Blacklist)", $message); // Lets stop DCC etc |
| 91 | 91 | |
| 92 | - $msg = IrcColourCode::RESET . IrcColourCode::BOLD . "[$instanceName]" . IrcColourCode::RESET . ": $message"; |
|
| 92 | + $msg = IrcColourCode::RESET.IrcColourCode::BOLD."[$instanceName]".IrcColourCode::RESET.": $message"; |
|
| 93 | 93 | |
| 94 | 94 | try { |
| 95 | 95 | $notification = new Notification(); |
@@ -127,7 +127,7 @@ discard block |
||
| 127 | 127 | */ |
| 128 | 128 | public function userApproved(User $user) |
| 129 | 129 | { |
| 130 | - $this->send("{$user->getUsername()} approved by " . $this->currentUser->getUsername()); |
|
| 130 | + $this->send("{$user->getUsername()} approved by ".$this->currentUser->getUsername()); |
|
| 131 | 131 | } |
| 132 | 132 | |
| 133 | 133 | /** |
@@ -138,7 +138,7 @@ discard block |
||
| 138 | 138 | */ |
| 139 | 139 | public function userDeclined(User $user, $reason) |
| 140 | 140 | { |
| 141 | - $this->send("{$user->getUsername()} declined by " . $this->currentUser->getUsername() . " ($reason)"); |
|
| 141 | + $this->send("{$user->getUsername()} declined by ".$this->currentUser->getUsername()." ($reason)"); |
|
| 142 | 142 | } |
| 143 | 143 | |
| 144 | 144 | /** |
@@ -149,7 +149,7 @@ discard block |
||
| 149 | 149 | */ |
| 150 | 150 | public function userSuspended(User $user, $reason) |
| 151 | 151 | { |
| 152 | - $this->send("{$user->getUsername()} suspended by " . $this->currentUser->getUsername() . " ($reason)"); |
|
| 152 | + $this->send("{$user->getUsername()} suspended by ".$this->currentUser->getUsername()." ($reason)"); |
|
| 153 | 153 | } |
| 154 | 154 | |
| 155 | 155 | /** |
@@ -159,7 +159,7 @@ discard block |
||
| 159 | 159 | */ |
| 160 | 160 | public function userPrefChange(User $user) |
| 161 | 161 | { |
| 162 | - $this->send("{$user->getUsername()}'s preferences were changed by " . $this->currentUser->getUsername()); |
|
| 162 | + $this->send("{$user->getUsername()}'s preferences were changed by ".$this->currentUser->getUsername()); |
|
| 163 | 163 | } |
| 164 | 164 | |
| 165 | 165 | /** |
@@ -170,7 +170,7 @@ discard block |
||
| 170 | 170 | */ |
| 171 | 171 | public function userRenamed(User $user, $old) |
| 172 | 172 | { |
| 173 | - $this->send($this->currentUser->getUsername() . " renamed $old to {$user->getUsername()}"); |
|
| 173 | + $this->send($this->currentUser->getUsername()." renamed $old to {$user->getUsername()}"); |
|
| 174 | 174 | } |
| 175 | 175 | |
| 176 | 176 | /** |
@@ -180,7 +180,7 @@ discard block |
||
| 180 | 180 | public function userRolesEdited(User $user, $reason) |
| 181 | 181 | { |
| 182 | 182 | $currentUser = $this->currentUser->getUsername(); |
| 183 | - $this->send("Active roles for {$user->getUsername()} changed by " . $currentUser . " ($reason)"); |
|
| 183 | + $this->send("Active roles for {$user->getUsername()} changed by ".$currentUser." ($reason)"); |
|
| 184 | 184 | } |
| 185 | 185 | |
| 186 | 186 | #endregion |
@@ -192,7 +192,7 @@ discard block |
||
| 192 | 192 | */ |
| 193 | 193 | public function siteNoticeEdited() |
| 194 | 194 | { |
| 195 | - $this->send("Site notice edited by " . $this->currentUser->getUsername()); |
|
| 195 | + $this->send("Site notice edited by ".$this->currentUser->getUsername()); |
|
| 196 | 196 | } |
| 197 | 197 | #endregion |
| 198 | 198 | |
@@ -204,7 +204,7 @@ discard block |
||
| 204 | 204 | */ |
| 205 | 205 | public function welcomeTemplateCreated(WelcomeTemplate $template) |
| 206 | 206 | { |
| 207 | - $this->send("Welcome template {$template->getId()} created by " . $this->currentUser->getUsername()); |
|
| 207 | + $this->send("Welcome template {$template->getId()} created by ".$this->currentUser->getUsername()); |
|
| 208 | 208 | } |
| 209 | 209 | |
| 210 | 210 | /** |
@@ -214,7 +214,7 @@ discard block |
||
| 214 | 214 | */ |
| 215 | 215 | public function welcomeTemplateDeleted($templateid) |
| 216 | 216 | { |
| 217 | - $this->send("Welcome template {$templateid} deleted by " . $this->currentUser->getUsername()); |
|
| 217 | + $this->send("Welcome template {$templateid} deleted by ".$this->currentUser->getUsername()); |
|
| 218 | 218 | } |
| 219 | 219 | |
| 220 | 220 | /** |
@@ -224,7 +224,7 @@ discard block |
||
| 224 | 224 | */ |
| 225 | 225 | public function welcomeTemplateEdited(WelcomeTemplate $template) |
| 226 | 226 | { |
| 227 | - $this->send("Welcome template {$template->getId()} edited by " . $this->currentUser->getUsername()); |
|
| 227 | + $this->send("Welcome template {$template->getId()} edited by ".$this->currentUser->getUsername()); |
|
| 228 | 228 | } |
| 229 | 229 | |
| 230 | 230 | #endregion |
@@ -241,7 +241,7 @@ discard block |
||
| 241 | 241 | $duration = "indefinitely"; |
| 242 | 242 | } |
| 243 | 243 | else { |
| 244 | - $duration = "until " . date("F j, Y, g:i a", $ban->getDuration()); |
|
| 244 | + $duration = "until ".date("F j, Y, g:i a", $ban->getDuration()); |
|
| 245 | 245 | } |
| 246 | 246 | |
| 247 | 247 | $username = $this->currentUser->getUsername(); |
@@ -257,8 +257,8 @@ discard block |
||
| 257 | 257 | */ |
| 258 | 258 | public function unbanned(Ban $ban, $unbanreason) |
| 259 | 259 | { |
| 260 | - $this->send($ban->getTarget() . " unbanned by " . $this->currentUser |
|
| 261 | - ->getUsername() . " (" . $unbanreason . ")"); |
|
| 260 | + $this->send($ban->getTarget()." unbanned by ".$this->currentUser |
|
| 261 | + ->getUsername()." (".$unbanreason.")"); |
|
| 262 | 262 | } |
| 263 | 263 | |
| 264 | 264 | #endregion |
@@ -273,15 +273,15 @@ discard block |
||
| 273 | 273 | public function requestReceived(Request $request) |
| 274 | 274 | { |
| 275 | 275 | $this->send( |
| 276 | - IrcColourCode::DARK_GREY . "[[" |
|
| 277 | - . IrcColourCode::DARK_GREEN . "acc:" |
|
| 278 | - . IrcColourCode::ORANGE . $request->getId() |
|
| 279 | - . IrcColourCode::DARK_GREY . "]]" |
|
| 280 | - . IrcColourCode::RED . " N " |
|
| 281 | - . IrcColourCode::DARK_BLUE . $this->baseUrl . "/internal.php/viewRequest?id={$request->getId()} " |
|
| 282 | - . IrcColourCode::DARK_RED . "* " |
|
| 283 | - . IrcColourCode::DARK_GREEN . $request->getName() |
|
| 284 | - . IrcColourCode::DARK_RED . " * " |
|
| 276 | + IrcColourCode::DARK_GREY."[[" |
|
| 277 | + . IrcColourCode::DARK_GREEN."acc:" |
|
| 278 | + . IrcColourCode::ORANGE.$request->getId() |
|
| 279 | + . IrcColourCode::DARK_GREY."]]" |
|
| 280 | + . IrcColourCode::RED." N " |
|
| 281 | + . IrcColourCode::DARK_BLUE.$this->baseUrl."/internal.php/viewRequest?id={$request->getId()} " |
|
| 282 | + . IrcColourCode::DARK_RED."* " |
|
| 283 | + . IrcColourCode::DARK_GREEN.$request->getName() |
|
| 284 | + . IrcColourCode::DARK_RED." * " |
|
| 285 | 285 | . IrcColourCode::RESET |
| 286 | 286 | ); |
| 287 | 287 | } |
@@ -442,7 +442,7 @@ discard block |
||
| 442 | 442 | public function emailCreated(EmailTemplate $template) |
| 443 | 443 | { |
| 444 | 444 | $username = $this->currentUser->getUsername(); |
| 445 | - $this->send("Email {$template->getId()} ({$template->getName()}) created by " . $username); |
|
| 445 | + $this->send("Email {$template->getId()} ({$template->getName()}) created by ".$username); |
|
| 446 | 446 | } |
| 447 | 447 | |
| 448 | 448 | /** |
@@ -453,7 +453,7 @@ discard block |
||
| 453 | 453 | public function emailEdited(EmailTemplate $template) |
| 454 | 454 | { |
| 455 | 455 | $username = $this->currentUser->getUsername(); |
| 456 | - $this->send("Email {$template->getId()} ({$template->getName()}) edited by " . $username); |
|
| 456 | + $this->send("Email {$template->getId()} ({$template->getName()}) edited by ".$username); |
|
| 457 | 457 | } |
| 458 | 458 | #endregion |
| 459 | 459 | } |