locate-cake-hater - annna - Annna the nice friendly bot.
HTML git clone git://bitreich.org/annna/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws65d7roiv6bfj7d652fid.onion/annna/
DIR Log
DIR Files
DIR Refs
DIR Tags
DIR README
---
locate-cake-hater (507B)
---
1 #!/bin/sh
2
3 export PATH="/home/annna/bin:$PATH"
4
5 ip="$1"
6 port="$2"
7
8 case "$ip" in
9 *:*)
10 country="$(geoiplookup6 "$ip" | sed 's:.*, :#:; s, ,-,g;' | tr '[:upper:]' '[:lower:]')"
11 ip="[$ip]"
12 ;;
13 *)
14 country="$(geoiplookup "$ip" | sed 's:.*, :#:; s, ,-,g;' | tr '[:upper:]' '[:lower:]')"
15 ;;
16 esac
17
18 if [ -z "$country" ];
19 then
20 country="somewhere unknown"
21 fi
22
23 case "${country}" in
24 geoip-country-*)
25 country="somewhere unknown"
26 ;;
27 esac
28
29 annna-say -c "#bitreich-tv" "$ip:$port cake hater from $country appeared."
30