diff --git a/PBot/VERSION.pm b/PBot/VERSION.pm index 0a8bac07..4eedb3ec 100644 --- a/PBot/VERSION.pm +++ b/PBot/VERSION.pm @@ -13,8 +13,8 @@ use warnings; # These are set automatically by the build/commit script use constant { BUILD_NAME => "PBot", - BUILD_REVISION => 538, - BUILD_DATE => "2014-04-02", + BUILD_REVISION => 539, + BUILD_DATE => "2014-04-03", }; 1; diff --git a/modules/compiler_vm/compiler_vm_client.pl b/modules/compiler_vm/compiler_vm_client.pl index a85957ba..a4ff7ad3 100755 --- a/modules/compiler_vm/compiler_vm_client.pl +++ b/modules/compiler_vm/compiler_vm_client.pl @@ -8,6 +8,7 @@ use IPC::Open2; use Text::Balanced qw(extract_bracketed extract_delimited); use IO::Socket; use LWP::UserAgent; +use Time::HiRes qw/gettimeofday/; my $debug = 0; @@ -1144,20 +1145,27 @@ if(defined $got_paste or (defined $got_run and $got_run eq "paste")) { if(open FILE, "< history/$channel.last-output") { my $last_output; + my $time = ; - while(my $line = ) { - $last_output .= $line; - } - close FILE; + if(gettimeofday - $time > 60 * 10) { + close FILE; + } else { + while(my $line = ) { + $last_output .= $line; + } + close FILE; - if($last_output eq $output) { - print "$nick: Same output.\n"; - exit 0; + if($last_output eq $output) { + print "$nick: Same output.\n"; + exit 0; + } } } print "$nick: $output\n"; open FILE, "> history/$channel.last-output" or die "Couldn't open $channel.last-output: $!"; +my $now = gettimeofday; +print FILE "$now\n"; print FILE "$output"; close FILE;