Introduction
Introduction Statistics Contact Development Disclaimer Help
Add locate-cake-hater script. - annna - Annna the nice friendly bot.
git clone git://bitreich.org/annna/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws6…
Log
Files
Refs
Tags
README
---
commit b71469abcae17ab633d1aed026e0da68845ba7d3
parent 66ec0f70d8bf610332500b401f27592e82d2effe
Author: Annna Robert-Houdin <[email protected]>
Date: Fri, 13 Nov 2020 20:40:15 +0100
Add locate-cake-hater script.
Thanks Parazyd for the work!
Diffstat:
A locate-cake-hater | 24 ++++++++++++++++++++++++
1 file changed, 24 insertions(+), 0 deletions(-)
---
diff --git a/locate-cake-hater b/locate-cake-hater
@@ -0,0 +1,24 @@
+#!/bin/sh
+
+export PATH="/home/annna/bin:$PATH"
+
+ip="$1"
+port="$2"
+
+case "$ip" in
+*:*)
+ country="$(geoiplookup6 "$ip" | awk '{print $NF}')"
+ ip="[$ip]"
+ ;;
+*)
+ country="$(geoiplookup "$ip" | awk '{print $NF}')"
+ ;;
+esac
+
+if [ -z "$country" ];
+then
+ country="somewhere unknown"
+fi
+
+annna-say -c "#bitreich-tv" "$ip:$port cake hater from $country appeared."
+
You are viewing proxied material from bitreich.org. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.