Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

autovote: add overflow message deletion

  • Loading branch information...
commit 2a432c5e227b8a1e6699be22ba58695cd60a9390 1 parent b25e939
@ysth ysth authored
Showing with 3 additions and 0 deletions.
  1. +3 −0  autovote.pl
View
3  autovote.pl
@@ -11,12 +11,14 @@
my $debug;
my $glyph;
my $spy;
+my $overflow;
GetOptions(
"config=s" => \$config_name,
"debug!" => \$debug,
"glyph" => \$glyph,
"spy" => \$spy,
+ "overflow" => \$overflow,
) or die "$0 --config=foo.json\n";
my $client = Client->new(config => $config_name);
@@ -54,6 +56,7 @@
emit("Inspecting message tag '@{$message->{tags}}'; subject '$message->{subject}'") if $debug;
if ((grep(/Parliament/, @{$message->{tags}}) && $message->{subject} =~ /^(Pass: )?(Upgrade|Install|Repair)/) ||
($glyph && grep(/Alert/, @{$message->{tags}}) && $message->{subject} eq "Glyph Discovered!") ||
+ ($overflow && grep(/Complaint/, @{$message->{tags}}) && $message->{subject} eq 'Wasting Resources') ||
($spy && grep(/Spies|Intelligence/, @{$message->{tags}}) && $message->{subject} =~ /Put Me To Work|Mission Objective Missing|Appropriation Report/)) {
emit("Trashing $message->{id}") if $debug;
push(@trash, $message->{id});
Please sign in to comment.
Something went wrong with that request. Please try again.