Repository navigation
Stop the bot crashing when hosted verification is unavailable - #38
Conversation
Moderator::scrutinizeCkey runs from GameServer's serverinfo timer for every connected player. Verifier::get throws VerifierException while hosted verification is unavailable, and the uncaught throw was a PHP fatal that took VZGCivilizationbot offline on 2026-10-28 and again on 2026-10-29. When verification status is unknown, skip the new-account checks (never treat the player as unverified) and skip the chat-moderation ban (admin status is unknown), logging a warning instead. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Caution Review failedThe pull request is closed. Walkthrough
Merge Risk:
|
…unavailable (#39) #38 caught VerifierException in Moderator's own verifier lookups, but scrutinizeCkey reaches Verifier::get through Civ13::ckeyinfo() too, and the plain loop timer turned that throw into a PHP fatal again (2026-10-29 13:19). Catch any throwable per ckey in the serverinfo timer and log it. The round embed's verified-player list also threw from the same lookup, so the embed was never built; omit that list while verification is unavailable. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Summary
Moderator::scrutinizeCkey()runs fromGameServer's 180-second serverinfo timer for every connected player. While hosted verification is unavailable,Verifier::get()throwsVerifierException('Hosted verification unavailable'). Nothing caught it, so the bot died with:This took the portable VZGCivilizationbot (Persistence/Gaia server) offline on 2026-10-28 10:32 and again on 2026-10-29 12:20, and
control.php startdoes not relaunch after a crash exit.Changes, in
Moderatoronly:scrutinizeCkey(): if verification status is unknown, skip the new-account checks and log a warning. An unknown status is never treated as unverified, so verified players are not banned during an outage.Testing
php -l src/Civ13/Moderator.php: no syntax errors.Civ13instance. The live check is the portable bot staying up with a player connected while verification is unavailable.Not in this PR
control.php startdoes not restart the bot after an abnormal exit (only after a reload request).Unhandled promise rejection ... VerifierExceptionandCould not create a MessageBuilder for test1714(GameServer.php:579) in stderr; they are logged but not fatal.🤖 Generated with Claude Code
Summary by CodeRabbit