diff --git a/README.md b/README.md index 87e6719..1ff9496 100644 --- a/README.md +++ b/README.md @@ -6,11 +6,6 @@ revbank - Banking for hackerspace visitors The following will disappear in a future version: -## Deprecated: `nyan`, `game` - -These non-serious, non-banking plugins will be removed. Please remove them -from `revbank.plugins`. - ## Deprecated: creating new accounts with `deposit` For a while now, there has been a dedicated plugin, `adduser` to create new @@ -31,8 +26,7 @@ line (space separated), but that's an unintended feature... # PLUGINS -Refer to [RevBank::Plugins](https://metacpan.org/pod/RevBank::Plugins) for -documentation about writing plugins. +Refer to [RevBank::Plugins](https://metacpan.org/pod/RevBank::Plugins) for documentation about writing plugins. Plugins themselves may have some documentation in the respective plugin files. diff --git a/plugins/game b/plugins/game deleted file mode 100644 index 90c0ccc..0000000 --- a/plugins/game +++ /dev/null @@ -1,139 +0,0 @@ -#!perl - -warn "The game plugin is deprecated and will be removed from a future revbank"; - -#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-fu game!"; - -my $start_time; -my $step; -my $slowest; -my $elapsed=1000; - -sub print_highscores() -{ - $slowest=1000; - print "\n---- fastest times ----\n"; - open my $in, "highscores.txt"; - my $nr=0; - while (<$in>) - { - my ($name,$time)=split(" "); - printf "$nr: %f $name\n", $time; - $nr++; - $slowest=$time; - } - if ($nr<10) - { - $slowest=1000; - } - - close($in); - print "-----------------------\n"; -} - -sub command :Tab(game) -{ - - my ($self, $cart, $command) = @_; - - return NEXT if $command !~ /^(?:game)$/; - - print "\nWelcome to SCAN-FU \\o/\n"; - - print_highscores(); - - $start_time=[gettimeofday]; - $step=1; - - return "NOW SCAN game_$step", \&step; - -} - - -sub step :Tab(whatevah) { - my ($self, $cart, $input) = @_; - - if ($step<5) - { - if ($input ne "game_$step") - { - print "\n\aFAIL! :( *sad trombone*\n"; - - return ACCEPT; - } - - $step++; - - return "NOW SCAN game_$step", \&step; - } - else - { - - $elapsed = tv_interval ( $start_time, [gettimeofday]); - - print "\aCompleted in $elapsed seconds *tadaah*\n"; - - if ($elapsed < $slowest) - { - print " #####################\n"; - print " #### NEW RECORD! ####\n"; - print " #####################\n"; - print " You did it in $elapsed !!!\n"; - - return "Enter your name for the hall of fame", \&name; - - } - - return ACCEPT; - } -} - -sub name :Tab(whatevah) -{ - my ($self, $cart, $input) = @_; - - - #store new highscores: - #(ulgy as hell...but hey i'm sleepy :) - - open my $in, "highscores.txt.tmp"; - my $nr=0; - while (<$in>) - { - $nr++; - my ($name,$time)=split(" "); - if ($elapsed!=-1 && $elapsed<=$time) - { - print $out "$input $elapsed\n"; - $elapsed=-1; - $nr++; - } - - print $out "$name $time\n"; - - if ($nr>10) - { - last; - } - } - if ($nr<10 && $elapsed!=-1) - { - print $out "$input $elapsed\n"; - } - - close($in); - close($out); - rename("highscores.txt.tmp", "highscores.txt"); - - print_highscores(); - - return ACCEPT; -} - diff --git a/plugins/nyan b/plugins/nyan deleted file mode 100644 index 5b6abd5..0000000 --- a/plugins/nyan +++ /dev/null @@ -1,163 +0,0 @@ -#!perl - -warn "The nyan plugin is deprecated and will be removed from a future revbank"; - -HELP "nyan" => "Nyan!"; - -sub command :Tab(nyan,nyanutf8) { - my ($self, $cart, $command) = @_; - - return NEXT if $command !~ /^(?:nyan|nyanutf8)$/; - - # thanks to https://gist.github.com/moshen/1417991 :) - my @frames = ( q( - H4sIAHywIU8AA+1d23XkOA797xT8oxBst+11z4QyMVQO+7ExbIAbydrdVXqCeJOEKNQZnzMURIq4 - BEAU6jb19M/b59/vfz/fnv78z8uvj9u0+zz98yUFrrI6PG473nX8wA/68cSYI+fze/hlNkvz9fWV - O7td9103p6kyJrq69vITeQTet6DIQY3X5094kXETYPclFS6ru37Q2w26k76jBJUPUPSHUF+vEvao - /djBVCQG0KHC1B540K2Exqve9jl9jbiVu7/9q2jih/EI2Ljj3tgIwp/DY2E41ZBJ7KcAJwtQjhUy - RnWGk1zDI9a1jZOz6OVbEZA+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HICq9/KMOhwhbrkDi4ZSz8qERxcqYDiW3hXIf+MzA1edVVncPOtnjbgY - v/zCtWPgL8YfSL11EWQjheBOIqJba8EdICIK/ymPx688gamFsXiLKcUCxNNShoDtu/WlifiLMEle - EOdsFsCaFAY3Vyrge2peaqiJ6lFQlgDbXWj+oXmAKrPyn9mP/wNvi7NrsNYCAA== - ) ); - - use Compress::Zlib; - use MIME::Base64; - use Time::HiRes qw( usleep gettimeofday ); - use Getopt::Long; - use Pod::Usage; - - @frames = split("::\n", Compress::Zlib::memGunzip(decode_base64($frames[0]))); - - my $limit = 4; - - if ($command eq "nyanutf8") { - @frames = @frames[12..23]; - } else { - @frames = @frames[0..11]; - } - - # Loop the animation per options set - my $loopcheck; - - $loopcheck = sub { - if ($limit) { - $limit--; - return 1; - } else { - return 0; - } - }; - - # Clear the screen - print "\033[2J"; - - # Animate! - while($loopcheck->()){ - my $frame = 0; - while($frame < 12){ - print "\033[0;0H"; # Jump to 0,0 - print $frames[$frame++]; - usleep(70000); - } - } - - return ACCEPT; -} diff --git a/revbank b/revbank index 4e5ab06..a865d16 100755 --- a/revbank +++ b/revbank @@ -258,11 +258,6 @@ revbank - Banking for hackerspace visitors The following will disappear in a future version: -=head2 Deprecated: C, C - -These non-serious, non-banking plugins will be removed. Please remove them -from C. - =head2 Deprecated: creating new accounts with C For a while now, there has been a dedicated plugin, C to create new @@ -287,6 +282,10 @@ Refer to L for documentation about writing plugins. Plugins themselves may have some documentation in the respective plugin files. +Note that plugins that begin with C are revspace specific hacks, and +were not written with reusability in mind. They will probably not work for your +setup. + =head1 AUTHOR Juerd Waalboer <#####@juerd.nl>