summaryrefslogtreecommitdiffstats
path: root/krebs/2configs/reaktor2.nix
diff options
context:
space:
mode:
authorlassulus <lassulus@lassul.us>2022-11-22 20:36:23 +0100
committerlassulus <lassulus@lassul.us>2022-11-22 20:36:23 +0100
commitbd6b355a89e5fb65ef25766a49931812726e7c7f (patch)
treee3d8d82088b7a551361927f4488dd4c91734d407 /krebs/2configs/reaktor2.nix
parent6e75d54c6b4b9741ca8a67cc9634595229a663af (diff)
reaktor2 confuse: allow usage only in public channel
Diffstat (limited to 'krebs/2configs/reaktor2.nix')
-rw-r--r--krebs/2configs/reaktor2.nix16
1 files 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
'';
};
};