From da11114b8f95755e9aa7713f96cb7784a179cdb6 Mon Sep 17 00:00:00 2001 From: Juerd Waalboer Date: Wed, 15 May 2019 01:24:20 +0200 Subject: [PATCH] Deprecate nyan, game, and creating users via deposit. --- README.md | 19 +++++++++++++++++++ plugins/deposit | 6 ++++++ plugins/game | 2 ++ plugins/nyan | 2 ++ revbank | 19 +++++++++++++++++++ revbank.plugins | 3 --- 6 files changed, 48 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 08ea8f5..bdb2ad6 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,25 @@ revbank - Banking for hackerspace visitors +# ANNOUNCEMENTS + +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 +accounts. The old way of creating new accounts (unknown input after a +`deposit` command was assumed to be the name of the a account) did not allow +for any input validation and would cause trouble if a user name already +existed. + +Please add `adduser` to `revbank.plugins`. + # DESCRIPTION Maybe I'll write some documentation, but not now. diff --git a/plugins/deposit b/plugins/deposit index eda794d..f01de1b 100755 --- a/plugins/deposit +++ b/plugins/deposit @@ -14,6 +14,12 @@ sub command :Tab(deposit) { if ($cart->select_items('is_deposit')) { # No other plugin recognised the input, so it must be a new user. $self->{new_user} = $command; + + my $x = RevBank::Plugin::adduser->can("command") + ? "Please use \e[4madduser\e[0m instead." + : "Please enable the \e[4madduser\e[0m plugin."; + warn "Creating accounts with \e[4mdeposit\e[m is deprecated. $x\n"; + return "Add new account for user '$command'?", \&create; } diff --git a/plugins/game b/plugins/game index 22eecb7..90c0ccc 100755 --- a/plugins/game +++ b/plugins/game @@ -1,5 +1,7 @@ #!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 :) diff --git a/plugins/nyan b/plugins/nyan index f244b08..5b6abd5 100755 --- a/plugins/nyan +++ b/plugins/nyan @@ -1,5 +1,7 @@ #!perl +warn "The nyan plugin is deprecated and will be removed from a future revbank"; + HELP "nyan" => "Nyan!"; sub command :Tab(nyan,nyanutf8) { diff --git a/revbank b/revbank index 134fc65..068e84d 100755 --- a/revbank +++ b/revbank @@ -218,6 +218,25 @@ OUTER: for (;;) { revbank - Banking for hackerspace visitors +=head1 ANNOUNCEMENTS + +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 +accounts. The old way of creating new accounts (unknown input after a +C command was assumed to be the name of the a account) did not allow +for any input validation and would cause trouble if a user name already +existed. + +Please add C to C. + =head1 DESCRIPTION Maybe I'll write some documentation, but not now. diff --git a/revbank.plugins b/revbank.plugins index c6dfe73..fb8fa8c 100644 --- a/revbank.plugins +++ b/revbank.plugins @@ -20,9 +20,6 @@ adduser beep_terminal -#nyan # fun, but not compatible with dumb terminals -#game # Scan-foo game - # Then, plugins that apply heuristics products # matches product IDs (barcodes)