You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if ($this->civ13->verifier->getVerifiedItem($ckey)) returnfalse; // Whether the ckey is verified
936
+
if (! @file_exists($this->serverdata) || ! $data = @file_get_contents($this->serverdata)) {
937
+
$this->logger->warning("Unable to open `{$this->serverdata}`");
938
+
returnfalse;
939
+
}
940
+
if (self::explodeServerdata($data)[12] ?? true) returnfalse; // Whether restart vote is allowed
941
+
if (! $guild = $this->discord->guilds->get('id', $this->civ13->civ13_guild_id)) returnfalse;
942
+
if (! $admins = $guild->members->filter(fn(Member$member) => $member->roles->has($this->civ13->role_ids['Admin']))) returnfalse; // Get a list of admins from the Discord server
943
+
if (array_reduce($admins->toArray(), function ($carry, $member) { // Check if any of the admins are online
944
+
/** @var bool $carry */
945
+
if ($carry) return$carry;
946
+
/** @var Member $member */
947
+
if (! $item = $this->civ13->verifier->get('discord', $member->id)) return$carry;
948
+
returnin_array($item['ss13'], $this->players);
949
+
}, false)) returnfalse;
950
+
return$this->ban(['ckey' => $ckey, 'duration' => '999 years', 'reason' => "Byond account `$ckey` must register and be approved to play. Verify at {$this->civ13->discord_formatted}"]);
951
+
}
952
+
940
953
/*
941
954
* These functions determine which of the above methods should be used to process a ban or unban
942
955
* Ban functions will return a string containing the results of the ban
@@ -1085,9 +1098,9 @@ public function logPlayerLogin(string $ckey, string $time, string $ip = '', stri
$this->civ13->__panicBan($ckey); // Require verification for Persistence rounds
127
-
return;
128
-
}
129
125
if (! isset($this->civ13->permitted[$ckey]) && ! isset($this->civ13->ages[$ckey]) && ! $this->civ13->checkByondAge($age = $this->civ13->getByondAge($ckey))) { // Force new accounts to register in Discord
130
126
$ban = ['ckey' => $ckey, 'duration' => '999 years', 'reason' => "Byond account `$ckey` must register and be approved to play. ($age) Verify at {$this->civ13->discord_formatted}"];
0 commit comments