function processRemoveStaleServers() { global $link; $now = time() - 5 * 60; $sql = "select gs_key from game_server where gs_lastheard < {$now}"; $result = mysql_query($sql); $count = 0; $len = mysql_num_rows($result); while ($count < $len) { processServerQuit(mysql_result($result, $count, 0)); $count++; } }
case 4: /* Server verify a client key */ verifyClientKey($data); /* If we got here that is good. Send back ok response */ echo chr(1); echo chr(1); break; case 5: /* Client has left this server game */ processClientLeaveGame($data); echo chr(1); echo chr(1); break; case 6: /* Server has quit */ processServerQuit($data); echo chr(1); echo chr(1); break; case 7: processServerUpdate($data); echo chr(1); echo chr(1); break; case 8: processTeams($data); break; case 9: processVersion($data); break; case 10: