/dev/null", $return); if ($return) return false; return ob_get_clean(); } function computeServerVersion($commit) { $filelist = getVersionedFile($commit, 'filelist.txt'); if ($filelist === false) return 0; $filenames = explode("\n", $filelist); $hash = hash_init('md5'); foreach ($filenames as &$i) { if ($i === '') continue; $data = getVersionedFile($commit, $i); if ($data !== false) { hash_update($hash, $data); } } return hash_final($hash); } $gitcache = 'config/git/cache'; $file = fopen($gitcache, 'c'); flock($file, LOCK_SH); $versions = unserialize(file_get_contents($gitcache)); flock($file, LOCK_EX); $lastmodified = @filemtime($gitcache); if (!is_array($versions) || !$lastmodified || (time() - $lastmodified > 60*60)) { // Need to update the cache. $since = null; if (!is_array($versions)) { $versions = array(); $since = '507894726c2b5c05d5c80865c6e1f5410816d3aa'; } else { $since = $versions[0]['commit']; } `GIT_DIR=config/git/Pokemon-Showdown.git git fetch > /dev/null 2>&1`; $commits = array_reverse(explode("\n", `GIT_DIR=config/git/Pokemon-Showdown.git git log --format=oneline ${since}..`)); foreach ($commits as &$i) { if ($i === '') continue; $parts = explode(' ', $i, 2); array_unshift($versions, array( 'commit' => $parts[0], 'message' => $parts[1], 'version' => computeServerVersion($parts[0]) )); } file_put_contents($gitcache, serialize($versions)); } flock($file, LOCK_UN); includeHeaderTop(); ?>

This page indexes versions of Pokémon Showdown by the output of the /version command.

You can use /version on a server to find out what version it is running.

If the output of /version is not listed here, the server is running custom code.

Commit Message Version