We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
@@ -7,7 +7,7 @@ |
||
7 | 7 | $db->query('SELECT game_id, game_name FROM game WHERE join_time < ' . $db->escapeNumber(TIME) . ' AND end_time > ' . $db->escapeNumber(TIME) . ' ORDER BY start_time DESC'); |
8 | 8 | while ($db->nextRecord()) { |
9 | 9 | $activeGames[] = array('game_name' => $db->getField('game_name'), |
10 | - 'game_id' => $db->getInt('game_id')); |
|
10 | + 'game_id' => $db->getInt('game_id')); |
|
11 | 11 | } |
12 | 12 | $template->assign('ActiveGames', $activeGames); |
13 | 13 |
@@ -46,5 +46,5 @@ |
||
46 | 46 | $template->assign('ProcessingHREF', $processingHREF); |
47 | 47 | |
48 | 48 | $template->assign('PermissionCategories', |
49 | - AdminPermissions::getPermissionsByCategory()); |
|
49 | + AdminPermissions::getPermissionsByCategory()); |
|
50 | 50 | } |
@@ -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 | } |
@@ -85,36 +84,50 @@ discard block |
||
85 | 84 | return true; |
86 | 85 | } |
87 | 86 | |
88 | - if (channel_msg_money($fp, $rdata, $account, $player)) |
|
89 | - return true; |
|
90 | - if (channel_msg_forces($fp, $rdata, $account, $player)) |
|
91 | - return true; |
|
87 | + if (channel_msg_money($fp, $rdata, $account, $player)) { |
|
88 | + return true; |
|
89 | + } |
|
90 | + if (channel_msg_forces($fp, $rdata, $account, $player)) { |
|
91 | + return true; |
|
92 | + } |
|
92 | 93 | |
93 | - if (channel_msg_seed($fp, $rdata, $account, $player)) |
|
94 | - return true; |
|
95 | - if (channel_msg_seedlist_add($fp, $rdata, $account, $player)) |
|
96 | - return true; |
|
97 | - if (channel_msg_seedlist_del($fp, $rdata, $account, $player)) |
|
98 | - return true; |
|
94 | + if (channel_msg_seed($fp, $rdata, $account, $player)) { |
|
95 | + return true; |
|
96 | + } |
|
97 | + if (channel_msg_seedlist_add($fp, $rdata, $account, $player)) { |
|
98 | + return true; |
|
99 | + } |
|
100 | + if (channel_msg_seedlist_del($fp, $rdata, $account, $player)) { |
|
101 | + return true; |
|
102 | + } |
|
99 | 103 | |
100 | - if (channel_msg_op_info($fp, $rdata, $account, $player)) |
|
101 | - return true; |
|
102 | - if (channel_msg_op_cancel($fp, $rdata, $account, $player)) |
|
103 | - return true; |
|
104 | - if (channel_msg_op_set($fp, $rdata, $account, $player)) |
|
105 | - return true; |
|
106 | - if (channel_msg_op_turns($fp, $rdata, $account, $player)) |
|
107 | - return true; |
|
108 | - if (channel_msg_op_response($fp, $rdata, $account, $player)) |
|
109 | - return true; |
|
110 | - if (channel_msg_op_list($fp, $rdata, $account, $player)) |
|
111 | - return true; |
|
112 | - if (channel_msg_sd_set($fp, $rdata, $account, $player)) |
|
113 | - return true; |
|
114 | - if (channel_msg_sd_del($fp, $rdata, $account, $player)) |
|
115 | - return true; |
|
116 | - if (channel_msg_sd_list($fp, $rdata, $account, $player)) |
|
117 | - return true; |
|
104 | + if (channel_msg_op_info($fp, $rdata, $account, $player)) { |
|
105 | + return true; |
|
106 | + } |
|
107 | + if (channel_msg_op_cancel($fp, $rdata, $account, $player)) { |
|
108 | + return true; |
|
109 | + } |
|
110 | + if (channel_msg_op_set($fp, $rdata, $account, $player)) { |
|
111 | + return true; |
|
112 | + } |
|
113 | + if (channel_msg_op_turns($fp, $rdata, $account, $player)) { |
|
114 | + return true; |
|
115 | + } |
|
116 | + if (channel_msg_op_response($fp, $rdata, $account, $player)) { |
|
117 | + return true; |
|
118 | + } |
|
119 | + if (channel_msg_op_list($fp, $rdata, $account, $player)) { |
|
120 | + return true; |
|
121 | + } |
|
122 | + if (channel_msg_sd_set($fp, $rdata, $account, $player)) { |
|
123 | + return true; |
|
124 | + } |
|
125 | + if (channel_msg_sd_del($fp, $rdata, $account, $player)) { |
|
126 | + return true; |
|
127 | + } |
|
128 | + if (channel_msg_sd_list($fp, $rdata, $account, $player)) { |
|
129 | + return true; |
|
130 | + } |
|
118 | 131 | |
119 | 132 | } |
120 | 133 | |
@@ -253,8 +266,9 @@ discard block |
||
253 | 266 | $countdown = intval($msg[5]); |
254 | 267 | $message = 'ALERT! ALERT! ALERT!'; |
255 | 268 | |
256 | - if (isset($msg[6])) |
|
257 | - $message .= ' ' . $msg[6]; |
|
269 | + if (isset($msg[6])) { |
|
270 | + $message .= ' ' . $msg[6]; |
|
271 | + } |
|
258 | 272 | |
259 | 273 | echo_r('[TIMER] ' . $nick . ' started a timer with ' . $countdown . ' minute(s) (' . $message . ') in ' . $channel); |
260 | 274 | |
@@ -364,8 +378,9 @@ discard block |
||
364 | 378 | if ($topic == 'seen') { |
365 | 379 | fputs($fp, 'NOTICE ' . $nick . ' :Syntax !seen <nickname>' . EOL); |
366 | 380 | fputs($fp, 'NOTICE ' . $nick . ' : Displays the last time <nickname> was seen' . EOL); |
367 | - } else |
|
368 | - 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 | + } |
|
369 | 384 | |
370 | 385 | // if ($topic == 'login') |
371 | 386 | // fputs($fp, 'NOTICE '.$nick.' :No help available yet! Ask MrSpock!'.EOL); |
@@ -4,7 +4,9 @@ |
||
4 | 4 | |
5 | 5 | $fn_seed = function($message) { |
6 | 6 | $link = new GameLink($message->channel, $message->author); |
7 | - if (!$link->valid) return; |
|
7 | + if (!$link->valid) { |
|
8 | + return; |
|
9 | + } |
|
8 | 10 | |
9 | 11 | $result = shared_channel_msg_seed($link->player); |
10 | 12 | $message->channel->sendMessage(join(EOL, $result)); |
@@ -6,7 +6,9 @@ discard block |
||
6 | 6 | |
7 | 7 | $fn_op = function($message) { |
8 | 8 | $link = new GameLink($message->channel, $message->author); |
9 | - if (!$link->valid) return; |
|
9 | + if (!$link->valid) { |
|
10 | + return; |
|
11 | + } |
|
10 | 12 | $player = $link->player; |
11 | 13 | |
12 | 14 | // print info about the next op |
@@ -16,7 +18,9 @@ discard block |
||
16 | 18 | |
17 | 19 | $fn_op_list = function($message) { |
18 | 20 | $link = new GameLink($message->channel, $message->author); |
19 | - if (!$link->valid) return; |
|
21 | + if (!$link->valid) { |
|
22 | + return; |
|
23 | + } |
|
20 | 24 | $player = $link->player; |
21 | 25 | |
22 | 26 | // print list of attendees |
@@ -26,7 +30,9 @@ discard block |
||
26 | 30 | |
27 | 31 | $fn_op_turns = function($message) { |
28 | 32 | $link = new GameLink($message->channel, $message->author); |
29 | - if (!$link->valid) return; |
|
33 | + if (!$link->valid) { |
|
34 | + return; |
|
35 | + } |
|
30 | 36 | $player = $link->player; |
31 | 37 | |
32 | 38 | // print list of attendees |
@@ -2,7 +2,9 @@ |
||
2 | 2 | |
3 | 3 | $fn_game = function($message) { |
4 | 4 | $link = new GameLink($message->channel, $message->author); |
5 | - if (!$link->valid) return; |
|
5 | + if (!$link->valid) { |
|
6 | + return; |
|
7 | + } |
|
6 | 8 | |
7 | 9 | $game = SmrGame::getGame($link->player->getGameID(), true); |
8 | 10 | $msg = "I am linked to game `" . $game->getDisplayName() . "` in this channel."; |
@@ -4,7 +4,9 @@ |
||
4 | 4 | |
5 | 5 | $fn_money = function($message) { |
6 | 6 | $link = new GameLink($message->channel, $message->author); |
7 | - if (!$link->valid) return; |
|
7 | + if (!$link->valid) { |
|
8 | + return; |
|
9 | + } |
|
8 | 10 | |
9 | 11 | $result = shared_channel_msg_money($link->player); |
10 | 12 | if ($result) { |
@@ -4,7 +4,9 @@ |
||
4 | 4 | |
5 | 5 | $fn_forces = function($message, $params) { |
6 | 6 | $link = new GameLink($message->channel, $message->author); |
7 | - if (!$link->valid) return; |
|
7 | + if (!$link->valid) { |
|
8 | + return; |
|
9 | + } |
|
8 | 10 | |
9 | 11 | // print the next expiring forces |
10 | 12 | $option = isset($params[0]) ? $params[0] : null; |
@@ -10,20 +10,22 @@ |
||
10 | 10 | } |
11 | 11 | $db->query(substr($query, 0, -1)); |
12 | 12 | } |
13 | - if (!empty($_REQUEST['favourite']) && is_numeric($_REQUEST['favourite'])) |
|
14 | - $db->query('REPLACE INTO account_votes_for_feature VALUES(' . $db->escapeNumber($account->getAccountID()) . ', ' . $db->escapeNumber($_REQUEST['favourite']) . ',\'FAVOURITE\')'); |
|
13 | + if (!empty($_REQUEST['favourite']) && is_numeric($_REQUEST['favourite'])) { |
|
14 | + $db->query('REPLACE INTO account_votes_for_feature VALUES(' . $db->escapeNumber($account->getAccountID()) . ', ' . $db->escapeNumber($_REQUEST['favourite']) . ',\'FAVOURITE\')'); |
|
15 | + } |
|
15 | 16 | |
16 | 17 | forward(create_container('skeleton.php', 'feature_request.php')); |
17 | -} |
|
18 | -else if ($_REQUEST['action'] == 'Set Status') { |
|
18 | +} else if ($_REQUEST['action'] == 'Set Status') { |
|
19 | 19 | if (empty($_REQUEST['status'])) { |
20 | 20 | create_error('You have to select a status to set'); |
21 | 21 | } |
22 | 22 | $status = $_REQUEST['status']; |
23 | - if (empty($_REQUEST['set_status_ids'])) |
|
24 | - create_error('You have to select a feature'); |
|
25 | - if (!$account->hasPermission(PERMISSION_MODERATE_FEATURE_REQUEST)) |
|
26 | - create_error('You do not have permission to do that'); |
|
23 | + if (empty($_REQUEST['set_status_ids'])) { |
|
24 | + create_error('You have to select a feature'); |
|
25 | + } |
|
26 | + if (!$account->hasPermission(PERMISSION_MODERATE_FEATURE_REQUEST)) { |
|
27 | + create_error('You do not have permission to do that'); |
|
28 | + } |
|
27 | 29 | |
28 | 30 | $db->query('UPDATE feature_request fr SET status = ' . $db->escapeString($status) . ' |
29 | 31 | , fav = ( |