Scrutinizer GitHub App not installed

We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.

Install GitHub App

Failed Conditions
Pull Request — master (#812)
by Dan
04:25
created
admin/Default/log_console.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -27,8 +27,9 @@
 block discarded – undo
27 27
 	// put hidden fields in for log type to have all fields selected on next page.
28 28
 	$logTypes = array();
29 29
 	$db->query('SELECT log_type_id FROM log_type');
30
-	while ($db->nextRecord())
31
-		$logTypes[] = $db->getInt('log_type_id');
30
+	while ($db->nextRecord()) {
31
+			$logTypes[] = $db->getInt('log_type_id');
32
+	}
32 33
 	$template->assign('LogTypes', $logTypes);
33 34
 
34 35
 	$template->assign('LogConsoleFormHREF', SmrSession::getNewHREF(create_container('skeleton.php', 'log_console_detail.php')));
Please login to merge, or discard this patch.
admin/Default/vote_create_processing.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -28,8 +28,7 @@
 block discarded – undo
28 28
 	
29 29
 	// put the msg into the database
30 30
 	$db->query('INSERT INTO voting (question, end) VALUES(' . $db->escapeString($question) . ',' . $db->escapeNumber($end) . ')');
31
-}
32
-else if ($_REQUEST['action'] == 'Add Option') {
31
+} else if ($_REQUEST['action'] == 'Add Option') {
33 32
 	if (empty($option)) {
34 33
 		create_error('You have to specify an option message.');
35 34
 	}
Please login to merge, or discard this patch.
admin/Default/1.6/universe_create_save_processing.php 1 patch
Braces   +15 added lines, -23 removed lines patch added patch discarded remove patch
@@ -19,8 +19,7 @@  discard block
 block discarded – undo
19 19
 	}
20 20
 	SmrSector::saveSectors();
21 21
 	$var['message'] = '<span class="green">Success</span> : Succesfully created galaxies.';
22
-}
23
-else if ($submit == 'Redo Connections') {
22
+} else if ($submit == 'Redo Connections') {
24 23
 	$galaxy = SmrGalaxy::getGalaxy($var['game_id'], $var['gal_on']);
25 24
 	if (!$galaxy->setConnectivity($_REQUEST['connect'])) {
26 25
 		$var['message'] = '<span class="red">Error</span> : Regenerating connections failed.';
@@ -28,13 +27,11 @@  discard block
 block discarded – undo
28 27
 		$var['message'] = '<span class="green">Success</span> : Regenerated connectivity with ' . $_REQUEST['connect'] . '% target.';
29 28
 	}
30 29
 	SmrSector::saveSectors();
31
-}
32
-elseif ($submit == 'Toggle Link') {
30
+} elseif ($submit == 'Toggle Link') {
33 31
 	$linkSector = SmrSector::getSector($var['game_id'], $var['sector_id']);
34 32
 	$linkSector->toggleLink($var['dir']);
35 33
 	SmrSector::saveSectors();
36
-}
37
-elseif ($submit == 'Create Locations') {
34
+} elseif ($submit == 'Create Locations') {
38 35
 	$galSectors = SmrSector::getGalaxySectors($var['game_id'], $var['gal_on']);
39 36
 	foreach ($galSectors as $galSector) {
40 37
 		$galSector->removeAllLocations();
@@ -54,8 +51,7 @@  discard block
 block discarded – undo
54 51
 		}
55 52
 	}
56 53
 	$var['message'] = '<span class="green">Success</span> : Succesfully added locations.';
57
-}
58
-elseif ($submit == 'Create Warps') {
54
+} elseif ($submit == 'Create Warps') {
59 55
 	//get all warp info from all gals, some need to be removed, some need to be added
60 56
 	$galaxy = SmrGalaxy::getGalaxy($var['game_id'], $var['gal_on']);
61 57
 	$galSectors = $galaxy->getSectors();
@@ -95,8 +91,7 @@  discard block
 block discarded – undo
95 91
 	}
96 92
 	SmrSector::saveSectors();
97 93
 	$var['message'] = '<span class="green">Success</span> : Succesfully added warps.';
98
-}
99
-elseif ($submit == 'Create Planets') {
94
+} elseif ($submit == 'Create Planets') {
100 95
 	$galaxy = SmrGalaxy::getGalaxy($var['game_id'], $var['gal_on']);
101 96
 	$galSectors = $galaxy->getSectors();
102 97
 	foreach ($galSectors as $galSector) {
@@ -109,13 +104,15 @@  discard block
 block discarded – undo
109 104
 		$numberOfPlanets = $_POST['type' . $planetTypeID];
110 105
 		for ($i = 1; $i <= $numberOfPlanets; $i++) {
111 106
 			$galSector = $galSectors[array_rand($galSectors)];
112
-			while ($galSector->hasPlanet()) $galSector = $galSectors[array_rand($galSectors)]; //1 per sector
107
+			while ($galSector->hasPlanet()) {
108
+				$galSector = $galSectors[array_rand($galSectors)];
109
+			}
110
+			//1 per sector
113 111
 			$galSector->createPlanet($planetTypeID);
114 112
 		}
115 113
 	}
116 114
 	$var['message'] = '<span class="green">Success</span> : Succesfully added planets.';
117
-}
118
-elseif ($submit == 'Create Ports') {
115
+} elseif ($submit == 'Create Ports') {
119 116
 	$numLevelPorts = [];
120 117
 	for ($i = 1; $i <= SmrPort::MAX_LEVEL; $i++) {
121 118
 		$numLevelPorts[$i] = $_REQUEST['port' . $i] ?? 0;
@@ -170,27 +167,23 @@  discard block
 block discarded – undo
170 167
 		}
171 168
 		SmrPort::savePorts();
172 169
 		$var['message'] = '<span class="green">Success</span> : Succesfully added ports.';
173
-	}
174
-	else {
170
+	} else {
175 171
 		$var['message'] = '<span class="red">Error: Your port race distribution must equal 100!</span>';
176 172
 	}
177
-}
178
-elseif ($submit == 'Edit Sector') {
173
+} elseif ($submit == 'Edit Sector') {
179 174
 	$editSector = SmrSector::getSector($var['game_id'], $var['sector_id']);
180 175
 
181 176
 	//update planet
182 177
 	if ($_POST['plan_type'] != '0') {
183 178
 		if (!$editSector->hasPlanet()) {
184 179
 			$editSector->createPlanet($_POST['plan_type']);
185
-		}
186
-		else {
180
+		} else {
187 181
 			$type = $editSector->getPlanet()->getTypeID();
188 182
 			if ($_POST['plan_type'] != $type) {
189 183
 				$editSector->getPlanet()->setTypeID($_POST['plan_type']);
190 184
 			}
191 185
 		}
192
-	}
193
-	else {
186
+	} else {
194 187
 		$editSector->removePlanet();
195 188
 	}
196 189
 
@@ -267,8 +260,7 @@  discard block
 block discarded – undo
267 260
 function checkSectorAllowedForLoc(SmrSector $sector, SmrLocation $location) {
268 261
 	if (!$location->isHQ()) {
269 262
 		return (count($sector->getLocations()) < 4 && !$sector->offersFederalProtection());
270
-	}
271
-	else {
263
+	} else {
272 264
 		//HQs are here
273 265
 		//find a sector where there are no locations yet
274 266
 		return !$sector->hasLocation();
Please login to merge, or discard this patch.
admin/Default/album_moderate.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -19,8 +19,7 @@
 block discarded – undo
19 19
 		$approved[$accountId] = get_album_nick($accountId);
20 20
 	}
21 21
 	$template->assign('Approved', $approved);
22
-}
23
-else {
22
+} else {
24 23
 	// check if the given account really has an entry
25 24
 	$db->query('SELECT * FROM album WHERE account_id = ' . $db->escapeNumber($account_id) . ' AND Approved = \'YES\'');
26 25
 	if ($db->nextRecord()) {
Please login to merge, or discard this patch.
admin/Default/notify_reply_processing.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -30,7 +30,9 @@
 block discarded – undo
30 30
 		$offenderAccount->addPoints($_REQUEST['offenderBanPoints'], $account, 7, $suspicion);
31 31
 	}
32 32
 }
33
-if (isset($_REQUEST['offendedReply'])) $offendedReply = $_REQUEST['offendedReply'];
33
+if (isset($_REQUEST['offendedReply'])) {
34
+	$offendedReply = $_REQUEST['offendedReply'];
35
+}
34 36
 
35 37
 if (isset($offendedReply) && $offendedReply != '') {
36 38
 	//next message
Please login to merge, or discard this patch.
admin/Default/album_moderate_processing.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -51,8 +51,7 @@
 block discarded – undo
51 51
 					WHERE album_id = '.$db->escapeNumber($account_id) . ' AND
52 52
 						  comment_id IN ('.$db->escapeArray($comment_ids) . ')');
53 53
 	}
54
-}
55
-else {
54
+} else {
56 55
 	create_error('No action chosen!');
57 56
 }
58 57
 
Please login to merge, or discard this patch.
tools/npc/npc.php 2 patches
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -121,7 +121,7 @@  discard block
 block discarded – undo
121 121
 		}
122 122
 
123 123
 		try {
124
-			$TRADE_ROUTE =& $GLOBALS['TRADE_ROUTE'];
124
+			$TRADE_ROUTE = & $GLOBALS['TRADE_ROUTE'];
125 125
 			debug('Action #' . $actions);
126 126
 
127 127
 			//We have to reload player on each loop
@@ -140,14 +140,14 @@  discard block
 block discarded – undo
140 140
 			}
141 141
 
142 142
 			if (!isset($TRADE_ROUTE)) { //We only want to change trade route if there isn't already one set.
143
-				$TRADE_ROUTES =& findRoutes($player);
144
-				$TRADE_ROUTE =& changeRoute($TRADE_ROUTES);
143
+				$TRADE_ROUTES = & findRoutes($player);
144
+				$TRADE_ROUTE = & changeRoute($TRADE_ROUTES);
145 145
 			}
146 146
 
147 147
 			if ($player->isDead()) {
148 148
 				debug('Some evil person killed us, let\'s move on now.');
149 149
 				$previousContainer = null; //We died, we don't care what we were doing beforehand.
150
-				$TRADE_ROUTE =& changeRoute($TRADE_ROUTES); //Change route
150
+				$TRADE_ROUTE = & changeRoute($TRADE_ROUTES); //Change route
151 151
 				processContainer(create_container('death_processing.php'));
152 152
 			}
153 153
 			if ($player->getNewbieTurns() <= NEWBIE_TURNS_WARNING_LIMIT && $player->getNewbieWarning()) {
@@ -239,7 +239,7 @@  discard block
 block discarded – undo
239 239
 							}
240 240
 							else {
241 241
 								//Move to next route or fed.
242
-								if (($TRADE_ROUTE =& changeRoute($TRADE_ROUTES)) === false) {
242
+								if (($TRADE_ROUTE = & changeRoute($TRADE_ROUTES)) === false) {
243 243
 									debug('Changing Route Failed');
244 244
 									processContainer(plotToFed($player));
245 245
 								}
@@ -271,7 +271,7 @@  discard block
 block discarded – undo
271 271
 						}
272 272
 						else {
273 273
 							//Move to next route or fed.
274
-							if (($TRADE_ROUTE =& changeRoute($TRADE_ROUTES)) === false) {
274
+							if (($TRADE_ROUTE = & changeRoute($TRADE_ROUTES)) === false) {
275 275
 								debug('Changing Route Failed');
276 276
 								processContainer(plotToFed($player));
277 277
 							}
@@ -606,9 +606,9 @@  discard block
 block discarded – undo
606 606
 		return $false;
607 607
 	}
608 608
 	$routeKey = array_rand($tradeRoutes);
609
-	$tradeRoute =& $tradeRoutes[$routeKey];
609
+	$tradeRoute = & $tradeRoutes[$routeKey];
610 610
 	unset($tradeRoutes[$routeKey]);
611
-	$GLOBALS['TRADE_ROUTE'] =& $tradeRoute;
611
+	$GLOBALS['TRADE_ROUTE'] = & $tradeRoute;
612 612
 	debug('Switched route', $tradeRoute);
613 613
 	return $tradeRoute;
614 614
 }
Please login to merge, or discard this patch.
Braces   +26 added lines, -47 removed lines patch added patch discarded remove patch
@@ -89,12 +89,10 @@  discard block
 block discarded – undo
89 89
 
90 90
 	try {
91 91
 		changeNPCLogin();
92
-	}
93
-	catch (ForwardException $e) {}
92
+	} catch (ForwardException $e) {}
94 93
 
95 94
 	NPCStuff();
96
-}
97
-catch (Throwable $e) {
95
+} catch (Throwable $e) {
98 96
 	logException($e);
99 97
 	// Try to shut down cleanly
100 98
 	exitNPC();
@@ -157,8 +155,7 @@  discard block
 block discarded – undo
157 155
 			$fedContainer = null;
158 156
 			if ($var['url'] == 'shop_ship_processing.php' && ($fedContainer = plotToFed($player, true)) !== true) { //We just bought a ship, we should head back to our trade gal/uno - we use HQ for now as it's both in our gal and a UNO, plus it's safe which is always a bonus
159 157
 				processContainer($fedContainer);
160
-			}
161
-			else if ($player->getShip()->isUnderAttack() === true
158
+			} else if ($player->getShip()->isUnderAttack() === true
162 159
 				&&($player->hasPlottedCourse() === false || $player->getPlottedCourse()->getEndSector()->offersFederalProtection() === false)
163 160
 				&&($fedContainer == null ? $fedContainer = plotToFed($player, true) : $fedContainer) !== true) { //We're under attack and need to plot course to fed.
164 161
 				// Get the lock, remove under attack and update.
@@ -171,20 +168,16 @@  discard block
 block discarded – undo
171 168
 				debug('Under Attack');
172 169
 				$underAttack = true;
173 170
 				processContainer($fedContainer);
174
-			}
175
-			else if ($player->hasPlottedCourse() === true && $player->getPlottedCourse()->getEndSector()->offersFederalProtection()) { //We have a route to fed to follow, figure it's probably a damned sensible thing to follow.
171
+			} else if ($player->hasPlottedCourse() === true && $player->getPlottedCourse()->getEndSector()->offersFederalProtection()) { //We have a route to fed to follow, figure it's probably a damned sensible thing to follow.
176 172
 				debug('Follow Course: ' . $player->getPlottedCourse()->getNextOnPath());
177 173
 				processContainer(moveToSector($player, $player->getPlottedCourse()->getNextOnPath()));
178
-			}
179
-			else if (($container = canWeUNO($player, true)) !== false) { //We have money and are at a uno, let's uno!
174
+			} else if (($container = canWeUNO($player, true)) !== false) { //We have money and are at a uno, let's uno!
180 175
 				debug('We\'re UNOing');
181 176
 				processContainer($container);
182
-			}
183
-			else if ($player->hasPlottedCourse() === true) { //We have a route to follow, figure it's probably a sensible thing to follow.
177
+			} else if ($player->hasPlottedCourse() === true) { //We have a route to follow, figure it's probably a sensible thing to follow.
184 178
 				debug('Follow Course: ' . $player->getPlottedCourse()->getNextOnPath());
185 179
 				processContainer(moveToSector($player, $player->getPlottedCourse()->getNextOnPath()));
186
-			}
187
-			else if ($player->getTurns() < NPC_LOW_TURNS || ($player->getTurns() < $player->getMaxTurns() / 2 && $player->getNewbieTurns() < NPC_LOW_NEWBIE_TURNS) || $underAttack) { //We're low on turns or have been under attack and need to plot course to fed
180
+			} else if ($player->getTurns() < NPC_LOW_TURNS || ($player->getTurns() < $player->getMaxTurns() / 2 && $player->getNewbieTurns() < NPC_LOW_NEWBIE_TURNS) || $underAttack) { //We're low on turns or have been under attack and need to plot course to fed
188 181
 				if ($player->getTurns() < NPC_LOW_TURNS) {
189 182
 					debug('Low Turns:' . $player->getTurns());
190 183
 				}
@@ -201,16 +194,13 @@  discard block
 block discarded – undo
201 194
 				}
202 195
 				$ship = $player->getShip();
203 196
 				processContainer(plotToFed($player, !$ship->hasMaxShields() || !$ship->hasMaxArmour() || !$ship->hasMaxCargoHolds()));
204
-			}
205
-			else if (($container = checkForShipUpgrade($player)) !== false) { //We have money and are at a uno, let's uno!
197
+			} else if (($container = checkForShipUpgrade($player)) !== false) { //We have money and are at a uno, let's uno!
206 198
 				debug('We\'re reshipping!');
207 199
 				processContainer($container);
208
-			}
209
-			else if (($container = canWeUNO($player, false)) !== false) { //We need to UNO and have enough money to do it properly so let's do it sooner rather than later.
200
+			} else if (($container = canWeUNO($player, false)) !== false) { //We need to UNO and have enough money to do it properly so let's do it sooner rather than later.
210 201
 				debug('We need to UNO, so off we go!');
211 202
 				processContainer($container);
212
-			}
213
-			else if ($TRADE_ROUTE instanceof \Routes\Route) {
203
+			} else if ($TRADE_ROUTE instanceof \Routes\Route) {
214 204
 				debug('Trade Route');
215 205
 				$forwardRoute = $TRADE_ROUTE->getForwardRoute();
216 206
 				$returnRoute = $TRADE_ROUTE->getReturnRoute();
@@ -218,8 +208,7 @@  discard block
 block discarded – undo
218 208
 					if ($forwardRoute->getBuySectorId() == $player->getSectorID()) {
219 209
 						$buyRoute = $forwardRoute;
220 210
 						$sellRoute = $returnRoute;
221
-					}
222
-					else if ($returnRoute->getBuySectorId() == $player->getSectorID()) {
211
+					} else if ($returnRoute->getBuySectorId() == $player->getSectorID()) {
223 212
 						$buyRoute = $returnRoute;
224 213
 						$sellRoute = $forwardRoute;
225 214
 					}
@@ -236,30 +225,25 @@  discard block
 block discarded – undo
236 225
 								//Sell goods
237 226
 								debug('Sell Goods');
238 227
 								processContainer(tradeGoods($goodID, $player, $port));
239
-							}
240
-							else {
228
+							} else {
241 229
 								//Move to next route or fed.
242 230
 								if (($TRADE_ROUTE =& changeRoute($TRADE_ROUTES)) === false) {
243 231
 									debug('Changing Route Failed');
244 232
 									processContainer(plotToFed($player));
245
-								}
246
-								else {
233
+								} else {
247 234
 									debug('Route Changed');
248 235
 									continue;
249 236
 								}
250 237
 							}
251
-						}
252
-						else if ($ship->hasCargo($buyRoute->getGoodID()) === true) { //We've bought goods, plot to sell
238
+						} else if ($ship->hasCargo($buyRoute->getGoodID()) === true) { //We've bought goods, plot to sell
253 239
 							debug('Plot To Sell: ' . $buyRoute->getSellSectorId());
254 240
 							processContainer(plotToSector($player, $buyRoute->getSellSectorId()));
255
-						}
256
-						else {
241
+						} else {
257 242
 							//Dump goods
258 243
 							debug('Dump Goods');
259 244
 							processContainer(dumpCargo($player));
260 245
 						}
261
-					}
262
-					else { //Buy goods
246
+					} else { //Buy goods
263 247
 						$goodID = $buyRoute->getGoodID();
264 248
 
265 249
 						$port = $player->getSector()->getPort();
@@ -268,26 +252,22 @@  discard block
 block discarded – undo
268 252
 						if ($tradeable === true && $port->getGoodAmount($goodID) >= $ship->getEmptyHolds()) { //Buy goods
269 253
 							debug('Buy Goods');
270 254
 							processContainer(tradeGoods($goodID, $player, $port));
271
-						}
272
-						else {
255
+						} else {
273 256
 							//Move to next route or fed.
274 257
 							if (($TRADE_ROUTE =& changeRoute($TRADE_ROUTES)) === false) {
275 258
 								debug('Changing Route Failed');
276 259
 								processContainer(plotToFed($player));
277
-							}
278
-							else {
260
+							} else {
279 261
 								debug('Route Changed');
280 262
 								continue;
281 263
 							}
282 264
 						}
283 265
 					}
284
-				}
285
-				else {
266
+				} else {
286 267
 					debug('Plot To Buy: ' . $forwardRoute->getBuySectorId());
287 268
 					processContainer(plotToSector($player, $forwardRoute->getBuySectorId()));
288 269
 				}
289
-			}
290
-			else { //Something weird is going on.. Let's fed and wait.
270
+			} else { //Something weird is going on.. Let's fed and wait.
291 271
 				debug('No actual action? Wtf?');
292 272
 				processContainer(plotToFed($player));
293 273
 			}
@@ -299,8 +279,7 @@  discard block
 block discarded – undo
299 279
 				processContainer(moveToSector($player,$moveTo));
300 280
 			}
301 281
 			*/
302
-		}
303
-		catch (ForwardException $e) {
282
+		} catch (ForwardException $e) {
304 283
 			global $lock;
305 284
 			if ($lock) { //only save if we have the lock.
306 285
 				SmrSector::saveSectors();
@@ -469,8 +448,7 @@  discard block
 block discarded – undo
469 448
 			$hardwareSold = $location->getHardwareSold();
470 449
 			if ($player->getNewbieTurns() > MIN_NEWBIE_TURNS_TO_BUY_CARGO && !$ship->hasMaxCargoHolds() && isset($hardwareSold[HARDWARE_CARGO]) && ($amount = floor(($player->getCredits() - MINUMUM_RESERVE_CREDITS) / Globals::getHardwareCost(HARDWARE_CARGO))) > 0) { // Buy cargo holds first if we have plenty of newbie turns left.
471 450
 				$hardwareID = HARDWARE_CARGO;
472
-			}
473
-			else {
451
+			} else {
474 452
 				foreach ($hardwareArray as $hardwareArrayID) {
475 453
 					if (!$ship->hasMaxHardware($hardwareArrayID) && isset($hardwareSold[$hardwareArrayID]) && ($amount = floor(($player->getCredits() - MINUMUM_RESERVE_CREDITS) / Globals::getHardwareCost($hardwareArrayID))) > 0) {
476 454
 						$hardwareID = $hardwareArrayID;
@@ -579,8 +557,10 @@  discard block
 block discarded – undo
579 557
 
580 558
 function checkForShipUpgrade(AbstractSmrPlayer $player) {
581 559
 	foreach (SHIP_UPGRADE_PATH[$player->getRaceID()] as $upgradeShipID) {
582
-		if ($player->getShipTypeID() == $upgradeShipID) //We can't upgrade, only downgrade.
560
+		if ($player->getShipTypeID() == $upgradeShipID) {
561
+			//We can't upgrade, only downgrade.
583 562
 			return false;
563
+		}
584 564
 		$cost = $player->getShip()->getCostToUpgrade($upgradeShipID);
585 565
 		if ($cost <= 0 || $player->getCredits() - $cost > MINUMUM_RESERVE_CREDITS) {
586 566
 			return doShipUpgrade($player, $upgradeShipID);
@@ -649,8 +629,7 @@  discard block
 block discarded – undo
649 629
 		$routes = unserialize(gzuncompress($db->getField('routes')));
650 630
 		debug('Using Cached Routes: #' . count($routes));
651 631
 		return $routes;
652
-	}
653
-	else {
632
+	} else {
654 633
 		debug('Generating Routes');
655 634
 		$allSectors = array();
656 635
 		foreach (SmrGalaxy::getGameGalaxies($player->getGameID()) as $galaxy) {
Please login to merge, or discard this patch.
tools/irc/channel_msg_sd.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -123,7 +123,9 @@
 block discarded – undo
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) {
Please login to merge, or discard this patch.
tools/irc/channel_msg.php 1 patch
Braces   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -47,8 +47,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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);
Please login to merge, or discard this patch.