From 6a0e09327e9f4b487a3a61d0ceefc83580dd2927 Mon Sep 17 00:00:00 2001 From: Ryan Voots Date: Fri, 7 Aug 2020 13:22:25 -0400 Subject: [PATCH] Added new plugin for people to discover --- cpanfile | 1 + plugins/supereval.pm | 2 +- plugins/talktome.pm | 26 ++++++++++++++++++++++++++ 3 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 plugins/talktome.pm diff --git a/cpanfile b/cpanfile index f80eabe..24c3738 100644 --- a/cpanfile +++ b/cpanfile @@ -160,3 +160,4 @@ requires 'V'; requires 'Path::Tiny'; requires 'CryptX'; requires 'MIME::Base64'; +requires 'DateTime::Event::Cron'; diff --git a/plugins/supereval.pm b/plugins/supereval.pm index 3cb0e9d..3d27de1 100644 --- a/plugins/supereval.pm +++ b/plugins/supereval.pm @@ -59,7 +59,7 @@ sub make_pastebin_all { } } -my @versions = ('', 't', qw(1 2 3 4 5.0 5.1 5.2 5.3 5.4 5.5 tall all rall yall), map {$_, $_."t"} qw/5.6 5.8 5.8.4 5.8.8 5.10 5.10.0 5.12 5.14 5.16 5.18 5.20 5.22 5.24 5.26 5.28 5.30 5.30.3 5.30.2 5.30.1 5.30.0 5.28.2 5.28.1 5.28.0 5.26.3 5.26.2 5.26.1 5.26.0 5.24.4 5.24.3 5.24.2 5.24.1 5.24.0 5.22.4 5.22.3 5.22.2 5.22.1 5.22.0 5.20.3 5.20.2 5.20.1 5.20.0 5.18.4 5.18.3 5.18.2 5.18.1 5.18.0 5.16.3 5.16.2 5.16.1 5.16.0 5.14.4 5.14.3 5.14.2 5.14.1 5.14.0 5.12.5 5.12.4 5.12.3 5.12.2 5.12.1 5.12.0 5.10.1 5.10.0 5.8.9 5.8.8 5.8.7 5.8.6 5.8.5 5.8.4 5.8.3 5.8.2 5.8.1 5.8.0 5.6.2 5.6.1 5.6.0/); +my @versions = ('', 't', qw(1 2 3 4 5.0 5.1 5.2 5.3 5.4 5.5 tall all rall yall), map {$_, $_."t"} qw/5.6 5.8 5.8.4 5.8.8 5.10 5.10.0 5.12 5.14 5.16 5.18 5.20 5.22 5.24 5.26 5.28 5.32 5.32.0 5.30 5.30.3 5.30.2 5.30.1 5.30.0 5.28.2 5.28.1 5.28.0 5.26.3 5.26.2 5.26.1 5.26.0 5.24.4 5.24.3 5.24.2 5.24.1 5.24.0 5.22.4 5.22.3 5.22.2 5.22.1 5.22.0 5.20.3 5.20.2 5.20.1 5.20.0 5.18.4 5.18.3 5.18.2 5.18.1 5.18.0 5.16.3 5.16.2 5.16.1 5.16.0 5.14.4 5.14.3 5.14.2 5.14.1 5.14.0 5.12.5 5.12.4 5.12.3 5.12.2 5.12.1 5.12.0 5.10.1 5.10.0 5.8.9 5.8.8 5.8.7 5.8.6 5.8.5 5.8.4 5.8.3 5.8.2 5.8.1 5.8.0 5.6.2 5.6.1 5.6.0/); sub new { my( $class ) = @_; diff --git a/plugins/talktome.pm b/plugins/talktome.pm new file mode 100644 index 0000000..6ab3c88 --- /dev/null +++ b/plugins/talktome.pm @@ -0,0 +1,26 @@ +use LWP::UserAgent; +use JSON::MaybeXS qw/encode_json/; + +sub { + my( $said ) = @_; + + my $ua = LWP::UserAgent->new( agent => "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_5) AppleWebKit/537.36 (KHTML, like Gecko, really Perlbot) Chrome/45.0.2454.85 Safari/537.36" ); + my $url = "https://nodered.simcop2387.info/perlbot/talktome/"; + + my $alexatest = { + text => $said->{body}, + who => $said->{name}, + }; + + my $resp = $ua->put( $url, "Content-Type" => "application/json", Content => encode_json($alexatest) ); + + if( not $resp ) { + print "Couldn't fetch [$url] you failure"; + return; + } + + print "You have sent an annoyance to simcop2387"; +} + +__DATA__ +talktome - Send a message to simcop2387's NSA listening device to be read out loud.