For older hiscores, see here."; $spork_record = '/opt/nethack/nethack.alt.org/sporkhack/var/record'; if (isset($_GET['old']) && ($_GET['old'] == '1')) { $info_txt = "These scores were played on SporkHack revision 466. The current version hiscores are here."; $spork_record = '/opt/nethack/nethack.alt.org/sporkhack.old/var/record'; } function topfunc($dat, $line) { global $topdata; $topdata[$line] = $dat; } function parse_file_spork($func) { global $spork_record; $fh = @fopen($spork_record, 'r'); while (!feof($fh)) { $line = fgets($fh, 256); /* FIXME: might need to increase if logfile/record format changes */ if (strlen($line) < 2) continue; $dat = parse_logfile_line($line); call_user_func($func, $dat, ++$rank); } fclose($fh); } parse_file_spork('topfunc'); nh_html_top('SporkHack top scores'); print mk_prefs_link(); if ($info_txt) print '
'.$info_txt; print '