Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions src/Civ13/GameServer.php
Original file line number Diff line number Diff line change
Expand Up @@ -507,7 +507,11 @@ public function serverinfoTimer(): TimerInterface
continue;
}
if (isset($this->civ13->moderator)) {
$this->civ13->moderator->scrutinizeCkey($ckey);
try {
$this->civ13->moderator->scrutinizeCkey($ckey);
} catch (\Throwable $e) { // A plain loop timer has no promise to reject; an escaping throw is a fatal error
$this->logger->warning("Skipped scrutinizing `$ckey`: {$e->getMessage()}");
}
}
}
});
Expand Down Expand Up @@ -638,7 +642,12 @@ public function createCurrentRoundEmbedMessageBuilder(): ?MessageBuilder
: substr($participating_players, 0, 1021).'...')
: 'None'
);
if ($discord_ids = array_filter(array_map(fn ($c) => ($item = $this->civ13->verifier->get('ss13', $c)) ? "<@{$item['discord']}>" : null, $players))) {
try {
$discord_ids = array_filter(array_map(fn ($c) => ($item = $this->civ13->verifier->get('ss13', $c)) ? "<@{$item['discord']}>" : null, $players));
} catch (VerifierException $e) { // Hosted verification is unavailable; keep the round embed without its verified list
$discord_ids = [];
}
if ($discord_ids) {
$embed->addFieldValues(
'Verified Players ('.count($discord_ids).')',
strlen($verified_players = implode(', ', $discord_ids)) <= 1024
Expand Down
Loading