#!perl #Scan-foo-game for Revbank - (C)Edwin Eefting (psy0rz) #Released under GPL or whatever revbank uses as license :) use Time::HiRes qw( gettimeofday tv_interval); HELP "game" => "Scan-foo game!"; sub command :Tab(game) { my ($self, $cart, $command) = @_; return NEXT if $command !~ /^(?:game)$/; print "\nWelcome to SCAN-FOO \\o/\n"; my $start_time=[gettimeofday]; for (my $i=1; $i<=5; $i++) { print "NOW SCAN game_$i: "; my $scanned=; if ($scanned ne "game_$i\n") { print "\nFAIL! :( *sad trombone*\n"; return ACCEPT; } } my $elapsed = tv_interval ( $start_time, [gettimeofday]); print "COMPLETED in $elapsed seconds *tadaah*\n"; return ACCEPT; }