We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
@@ -123,7 +123,9 @@ |
||
123 | 123 | if ($sd[3] == $channel) { |
124 | 124 | |
125 | 125 | $seconds_since_refresh = time() - $sd[2]; |
126 | - if ($seconds_since_refresh < 0) $seconds_since_refresh = 0; |
|
126 | + if ($seconds_since_refresh < 0) { |
|
127 | + $seconds_since_refresh = 0; |
|
128 | + } |
|
127 | 129 | $amt_to_add = floor($seconds_since_refresh * $refresh_per_sec); |
128 | 130 | |
129 | 131 | if ($sd[1] + $amt_to_add > 4000) { |
@@ -47,8 +47,7 @@ discard block |
||
47 | 47 | // get smr player |
48 | 48 | try { |
49 | 49 | $player = SmrPlayer::getPlayer($account->getAccountID(), $alliance->getGameId(), true); |
50 | - } |
|
51 | - catch (PlayerNotFoundException $e) { |
|
50 | + } catch (PlayerNotFoundException $e) { |
|
52 | 51 | if ($validationMessages === true) { |
53 | 52 | fputs($fp, 'PRIVMSG ' . $channel . ' :' . $nick . ', you have not joined the game that this channel belongs to.' . EOL); |
54 | 53 | } |
@@ -379,8 +378,9 @@ discard block |
||
379 | 378 | if ($topic == 'seen') { |
380 | 379 | fputs($fp, 'NOTICE ' . $nick . ' :Syntax !seen <nickname>' . EOL); |
381 | 380 | fputs($fp, 'NOTICE ' . $nick . ' : Displays the last time <nickname> was seen' . EOL); |
382 | - } else |
|
383 | - fputs($fp, 'NOTICE ' . $nick . ' :There is no help available for this command! Try !help' . EOL); |
|
381 | + } else { |
|
382 | + fputs($fp, 'NOTICE ' . $nick . ' :There is no help available for this command! Try !help' . EOL); |
|
383 | + } |
|
384 | 384 | |
385 | 385 | // if ($topic == 'login') |
386 | 386 | // fputs($fp, 'NOTICE '.$nick.' :No help available yet! Ask MrSpock!'.EOL); |
@@ -6,12 +6,13 @@ discard block |
||
6 | 6 | function echo_r($message) |
7 | 7 | { |
8 | 8 | if (is_array($message)) { |
9 | - foreach ($message as $msg) |
|
10 | - echo_r($msg); |
|
9 | + foreach ($message as $msg) { |
|
10 | + echo_r($msg); |
|
11 | + } |
|
12 | + } else { |
|
13 | + echo date("d.m.Y H:i:s => ") . $message . EOL; |
|
14 | + } |
|
11 | 15 | } |
12 | - else |
|
13 | - echo date("d.m.Y H:i:s => ") . $message . EOL; |
|
14 | -} |
|
15 | 16 | |
16 | 17 | // not keeping the filehandle might not be the wisest idea. |
17 | 18 | function write_log_message($msg) |
@@ -144,8 +145,7 @@ discard block |
||
144 | 145 | sleep(60); |
145 | 146 | |
146 | 147 | } |
147 | - } |
|
148 | - catch (TimeoutException $e) { |
|
148 | + } catch (TimeoutException $e) { |
|
149 | 149 | // Ignore the timeout exception, we'll loop round and reconnect. |
150 | 150 | } |
151 | 151 | } // end of while running |