Skip to content

Commit

Permalink
Merge pull request EloGank#1 from iggyvolz/master
Browse files Browse the repository at this point in the history
Fix preg_match for LoLNexusParser: domain name now given instead of IP
  • Loading branch information
Divi committed Jun 18, 2015
2 parents a44062a + ea2123e commit 67cff8b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion examples/utils/LoLNexusParser.php
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ public function parsePlayer($regionId, $playerName, OutputInterface $output = nu

$response = $buzz->get('http://www.lolnexus.com/ajax/get-game-info/' . self::$serverNames[$regionId - 1] . '.json?name=' . urlencode($playerName));

if (!preg_match('/lrf:\/\/spectator [0-9.:]+ (.*) ([0-9]+) ([A-Z0-9]+) [0-9\.]+/', $response->getContent(), $matches)) {
if (!preg_match('/lrf:\/\/spectator [0-9a-zA-Z.:]+ (.*) ([0-9]+) ([A-Z0-9]+) [0-9\.]+/', $response->getContent(), $matches)) {
throw new \RuntimeException('Cannot parse LoL Nexus game page, the game may be ended (sometimes LoLNexus\'s cache is bad), please retry.');
}

Expand Down

0 comments on commit 67cff8b

Please sign in to comment.