From 0dcacfc659a0d4996641e876550d0981d6718e38 Mon Sep 17 00:00:00 2001 From: Juerd Waalboer Date: Mon, 18 Sep 2023 01:35:11 +0200 Subject: [PATCH] Upstream support for angel-foo input as alias for foo. This replaces the revspace_angel plugin at RevSpace. --- plugins/regex_angel | 4 ++++ revbank.plugins | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 plugins/regex_angel diff --git a/plugins/regex_angel b/plugins/regex_angel new file mode 100644 index 0000000..ee457cb --- /dev/null +++ b/plugins/regex_angel @@ -0,0 +1,4 @@ +sub command($self, $cart, $command, @) { + return REDO, $1 if $command =~ /^angel-(.*)/; + return NEXT; +} diff --git a/revbank.plugins b/revbank.plugins index 5ce8d1e..206c3ec 100644 --- a/revbank.plugins +++ b/revbank.plugins @@ -45,5 +45,6 @@ statiegeld_tokens products # matches product IDs (barcodes) market # also matches product IDs users # matches usernames -url +#regex_angel # matches SHA2017/MCH2022 angel badges +url # matches URLs #deprecated_raw # matches amounts