From bd6b355a89e5fb65ef25766a49931812726e7c7f Mon Sep 17 00:00:00 2001 From: lassulus Date: Tue, 22 Nov 2022 20:36:23 +0100 Subject: reaktor2 confuse: allow usage only in public channel --- krebs/2configs/reaktor2.nix | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/krebs/2configs/reaktor2.nix b/krebs/2configs/reaktor2.nix index 70f5c424f..4e1a5d41d 100644 --- a/krebs/2configs/reaktor2.nix +++ b/krebs/2configs/reaktor2.nix @@ -64,12 +64,16 @@ let pkgs.gnused pkgs.stable-generate ]} - stable_url=$(stable-generate "$@") - paste_url=$(curl -Ss "$stable_url" | - curl -Ss https://p.krebsco.de --data-binary @- | - tail -1 - ) - echo "$_from: $paste_url" + if [ $_msgtarget = '#krebs' ] || [ $_msgtarget = '#xxx' ]; then + stable_url=$(stable-generate "$@") + paste_url=$(curl -Ss "$stable_url" | + curl -Ss https://p.krebsco.de --data-binary @- | + tail -1 + ) + echo "$_from: $paste_url" + else + echo "please use me in a public channel" + fi ''; }; }; -- cgit v1.2.3