summaryrefslogtreecommitdiffstats
path: root/.graveyard
diff options
context:
space:
mode:
authortv <tv@nomic.retiolum>2013-12-09 20:07:19 +0100
committertv <tv@nomic.retiolum>2013-12-09 20:07:19 +0100
commitf4f5b3b7aff2ac45ee035f54d6e8899ff963d133 (patch)
tree415410184165bbeaa7ed0cb54b7b915a856e909b /.graveyard
parent5788b95fe7834d3049df9de1009f3d8dbc34fea2 (diff)
noise: RIP
Diffstat (limited to '.graveyard')
-rw-r--r--.graveyard/noise/Makefile18
-rw-r--r--.graveyard/noise/TODO60
-rwxr-xr-x.graveyard/noise/cron/bin/zeit18
-rwxr-xr-x.graveyard/noise/init.d/noise48
-rwxr-xr-x.graveyard/noise/modules/cat14
-rwxr-xr-x.graveyard/noise/modules/chat33
-rwxr-xr-x.graveyard/noise/modules/date6
-rwxr-xr-x.graveyard/noise/modules/echo6
-rwxr-xr-x.graveyard/noise/modules/ein_mal_eins37
-rwxr-xr-x.graveyard/noise/modules/espeak34
-rwxr-xr-x.graveyard/noise/modules/help24
-rwxr-xr-x.graveyard/noise/modules/join15
-rwxr-xr-x.graveyard/noise/modules/lang22
l---------.graveyard/noise/modules/licht1
-rwxr-xr-x.graveyard/noise/modules/mpc14
-rwxr-xr-x.graveyard/noise/modules/names22
-rwxr-xr-x.graveyard/noise/modules/nick10
-rwxr-xr-x.graveyard/noise/modules/overlord14
-rwxr-xr-x.graveyard/noise/modules/part15
-rwxr-xr-x.graveyard/noise/modules/ping24
-rwxr-xr-x.graveyard/noise/modules/play36
-rwxr-xr-x.graveyard/noise/modules/pong26
-rwxr-xr-x.graveyard/noise/modules/query23
-rwxr-xr-x.graveyard/noise/modules/send_to_channel17
-rwxr-xr-x.graveyard/noise/modules/sendmail55
-rwxr-xr-x.graveyard/noise/modules/shackstatus104
-rwxr-xr-x.graveyard/noise/modules/sleep10
-rwxr-xr-x.graveyard/noise/modules/stream2
-rwxr-xr-x.graveyard/noise/modules/temp50
-rwxr-xr-x.graveyard/noise/modules/test13
-rwxr-xr-x.graveyard/noise/modules/twitter125
-rwxr-xr-x.graveyard/noise/modules/vvs17
-rwxr-xr-x.graveyard/noise/modules/wall8
-rwxr-xr-x.graveyard/noise/modules/zeit19
-rwxr-xr-x.graveyard/noise/noise186
-rwxr-xr-x.graveyard/noise/noise-as-user4
-rwxr-xr-x.graveyard/noise/noise-server4
37 files changed, 1134 insertions, 0 deletions
diff --git a/.graveyard/noise/Makefile b/.graveyard/noise/Makefile
new file mode 100644
index 00000000..0d72b2e9
--- /dev/null
+++ b/.graveyard/noise/Makefile
@@ -0,0 +1,18 @@
+
+.PHONY: all
+all: select-target
+
+.PHONY: infest
+infest:
+ apt-get install --yes expect beep alsa-utils ucspi-tcp espeak
+ f=/usr/bin/beep; chown krebs:krebs $$f && chmod 4755 $$f
+ getent passwd noise || useradd noise
+ echo 'noise ALL=(ALL) NOPASSWD: /krebs/streams/streams' | magic create noise /etc/sudoers
+ ln -vsnf /krebs/noise/init.d/noise /etc/init.d/noise
+ ## tv: TODO update-rc.d is DEBIAN ONLY, fix this
+ update-rc.d -f noise defaults
+ amixer sset 'Master' 100 unmute || true
+ amixer sset 'PCM' 100 unmute || true
+ amixer sset 'PC Speaker' 100 unmute || \
+ amixer sset 'Beep' 100 unmute || true
+
diff --git a/.graveyard/noise/TODO b/.graveyard/noise/TODO
new file mode 100644
index 00000000..a20f74e9
--- /dev/null
+++ b/.graveyard/noise/TODO
@@ -0,0 +1,60 @@
+#### file:noise/TODO
+
+- /channels
+- /hist N -- zum anzeigen von N letzten Nachrichten
+ - Log? Es werden maximal chat_histsize Zeilen gespeichert.
+- Anbindung ans MoinMoin
+- IRC <-> 23.shack - Brücke
+- when nick changes say "You're now known as XXX" to yourself
+- twitter: push new tweets as they arrive to all connected clients with
+ the variable tweet_me set to ON
+
+- Author, Maintainer etc. direkt in die Module in der erweiterten Hilfe, also
+ in /help MODULENAME -> man sollte sich auf ein einheitliches Dokmentierungs-
+ Format einigen.
+ - All modules should contain:
+ - Author(s) w/ e-mail, Copyright, License
+ - Maintainer(s) w/ e-mail
+ - Module-Version
+ - last tested System-Version
+ - we need to export the system version
+- GIT commits tweeten (shack und root)
+- /kick [CHANNEL] # from channel / telnet
+- /ban # :-)
+- /op
+- USER-A: /ping USER-B
+ - USER-B: /pong
+ - write time to USER-{A,B}
+- style-sheets for everything MOAR!!1
+- libraries
+- HTTP-interface
+- /whois, /whoami, /whowas
+- join,part&co. should support multiple channels
+- /TODO,/bug,/issue or something should be added as tracking-system
+- /part should say something like "X has left."
+- /join should say something like "X has joined."
+ # it's obvious that the channels is meant...
+ - or else say: "X has joined channel Y." when we can join more than one
+ channel
+- /part should unset chat_channel (somehow) else keeping /part'ing will
+ broadcast to chat_channel that X has quit...
+- split /twitter into /tweet and X, to make it clear when tweets are fired
+- POP3 mail off googlemail and show them to curious telnetters
+- /set x 23 -> blah $x
+
+- /rewrite -- e.g. /rewrite "!%s" "/play %s" oder sowasi
+- Zugriff per ssh
+- module to standard unix-commands (name like /system)
+ - unix-commands should simply link to system
+- /save TOKEN, /load TOKEN
+- /op # NUR VIA SSH! (s.o.)
+- MODULE-TEST-SUITE [blackbox]
+- sub-modules like /chat-join which may be abbreviated as /join when
+ $default_command is set to /chat, YAY
+ - unclutter /help:
+ - /help -> show all (main) modules
+ - /help MODULE -> show help of MODULE and show all sub-modules
+ - /help MODULE SUB-MODULE -> show help of SUB-MODULE and show all sub^2...
+- watchdog
+
+#### end of file.
diff --git a/.graveyard/noise/cron/bin/zeit b/.graveyard/noise/cron/bin/zeit
new file mode 100755
index 00000000..168a7b7b
--- /dev/null
+++ b/.graveyard/noise/cron/bin/zeit
@@ -0,0 +1,18 @@
+#! /bin/sh
+
+beep -l 1000 -f 4000
+sleep 1
+/krebs/morse/morse.sh -l 100 -f 700 `date +%k`
+sleep 1
+expect >/dev/null <<EOF
+spawn nc localhost telnet
+expect READY.
+send "/zeit\r"
+expect READY.
+# pitch set to 10
+expect READY.
+# Playing WAVE 'stdin' : Signed 16 bit Little Endian, Rate 22050 Hz, Mono
+expect READY.
+# pitch changed from 10 to 100
+expect READY.
+EOF
diff --git a/.graveyard/noise/init.d/noise b/.graveyard/noise/init.d/noise
new file mode 100755
index 00000000..075e47d7
--- /dev/null
+++ b/.graveyard/noise/init.d/noise
@@ -0,0 +1,48 @@
+#!/bin/sh -e
+### BEGIN INIT INFO
+# Provides: noise
+# Required-Start: $remote_fs $syslog dbus
+# Required-Stop: $remote_fs $syslog dbus
+# Default-Start: 2 3 4 5
+# Default-Stop: 1
+# Short-Description: Start the noise "Telnet" server
+# Description: System mode startup script for
+# the noise "Telnet" server.
+### END INIT INFO
+
+DAEMON=/krebs/noise/noise-server
+
+test -x $DAEMON || exit 1
+
+noise_pid() {
+ ps aux | grep tcpserver | grep noise-as-user | awk '{print$2}'
+}
+
+noise_start() {
+ "$DAEMON" &
+}
+
+noise_stop() {
+ kill "`noise_pid`"
+}
+
+case "$1" in
+ start|stop)
+ noise_${1}
+ ;;
+ restart|reload|force-reload)
+ noise_stop
+ noise_start
+ ;;
+ #force-stop) ;;
+ status)
+ kill -s 0 "`noise_pid`"
+ exit $?
+ ;;
+ *)
+ echo "Usage: /etc/init.d/noise {start|stop|force-stop|restart|reload|force-reload|status}"
+ exit 1
+ ;;
+esac
+
+exit 0
diff --git a/.graveyard/noise/modules/cat b/.graveyard/noise/modules/cat
new file mode 100755
index 00000000..e090acba
--- /dev/null
+++ b/.graveyard/noise/modules/cat
@@ -0,0 +1,14 @@
+#! /bin/sh
+case "$1" in
+ (--help) : ;;
+ (*)
+ while read line ; do
+ case "$line" in
+ (/quit)
+ break 2
+ ;;
+ (*)
+ echo "[$line]"
+ esac
+ done
+esac
diff --git a/.graveyard/noise/modules/chat b/.graveyard/noise/modules/chat
new file mode 100755
index 00000000..e5badc36
--- /dev/null
+++ b/.graveyard/noise/modules/chat
@@ -0,0 +1,33 @@
+#! /bin/sh
+
+case "$1" in
+ (--help) echo send text to everyone with @@ prepended ;;
+ (/nick)
+ echo set nick to $2
+ echo /set chat_nick $2 >$NOISE_linefeed;;
+ (/names)
+ cd /tmp/noise
+ . $NOISE_pid/environment
+ nick="${chat_nick-$NOISE_pid}"
+ channel="$chat_channel"
+ echo "Users in channel $channel"
+ for client in * ; do
+ . $client/environment
+ chat_nick="${chat_nick-$client}"
+ if test "$channel" = "$chat_channel" && test "$default_command" = chat ; then
+ echo "$chat_nick"
+ fi
+ unset chat_nick
+ unset chat_channel
+ unset default_command
+ done ;;
+ (*)
+ cd /tmp/noise
+ . $NOISE_pid/environment
+ nick="${chat_nick-$NOISE_pid}"
+
+ echo "/send_to_channel $chat_channel $nick: $*" > $NOISE_linefeed
+
+
+ #echo /wall @@ $* >$NOISE_linefeed
+esac
diff --git a/.graveyard/noise/modules/date b/.graveyard/noise/modules/date
new file mode 100755
index 00000000..8cd1b0c1
--- /dev/null
+++ b/.graveyard/noise/modules/date
@@ -0,0 +1,6 @@
+#! /bin/sh
+case "$1" in
+ (--help) : ;;
+ (*)
+ date --rfc-3339=s
+esac
diff --git a/.graveyard/noise/modules/echo b/.graveyard/noise/modules/echo
new file mode 100755
index 00000000..344dd963
--- /dev/null
+++ b/.graveyard/noise/modules/echo
@@ -0,0 +1,6 @@
+#! /bin/sh
+case "$1" in
+ (--help) : ;;
+ (*)
+ echo "$*"
+esac
diff --git a/.graveyard/noise/modules/ein_mal_eins b/.graveyard/noise/modules/ein_mal_eins
new file mode 100755
index 00000000..e21612a5
--- /dev/null
+++ b/.graveyard/noise/modules/ein_mal_eins
@@ -0,0 +1,37 @@
+#! /bin/bash
+
+R() {
+ echo "`od -t d -N 1 /dev/urandom | sed -n '1s/^[0-9]\+ \+//p'` % $@" | bc
+}
+
+
+
+
+case "$1" in
+ (--help) echo Stellt eine einfache Aufgabe ;;
+ (*)
+ a="`R 69`"
+ b="`R 69`"
+ op="`echo "\
+Was ist, A hoch B
+Was ist, A plus B
+Was ist, A minus B
+Was ist, A mal B
+Was ist, sinus von 0
+Was ist, Pi halbe mal 2
+Was ist, 2 hoch 8
+Was ist, 2 hoch 16
+Was ist, 2 hoch 32
+Was ist, 42 geteilt durch Pi mal 100
+Was ist, l n von 1
+Was ist, 42
+Was ist, 23
+Starte den Server neu
+Löte ein Kabel an einen Kompjuter
+Was ist, A geteilt durch B"`"
+ o="$(R `echo "$op" | wc -l` + 1)"
+
+ aufgabe=`echo "$op" | sed -n "$o{s/A/$a/;s/B/$b/;p}"`
+
+ echo "/espeak -v Löse die Aufgabe: $aufgabe?" >$NOISE_linefeed
+esac
diff --git a/.graveyard/noise/modules/espeak b/.graveyard/noise/modules/espeak
new file mode 100755
index 00000000..815d9d99
--- /dev/null
+++ b/.graveyard/noise/modules/espeak
@@ -0,0 +1,34 @@
+#! /bin/sh
+
+print_var() {
+ echo "$1 = $2"
+}
+
+speak() {
+ p="${noise_pitch-100}"
+ v="${noise_lang-de}"
+ k="${noise_capital-0}"
+ a="${noise_amplitude-600}"
+ g="${noise_gap-1}"
+ if test "$debug" = true; then
+ print_var pitch $p
+ print_var lang $v
+ print_var capital $k
+ print_var amplitude $a
+ print_var gap $g
+ fi
+ if test "$verbose" = true; then
+ echo "espeak: $@"
+ fi
+ #echo "espeak -p \"$pitch\" -v \"$lang\" \"$*\"" >&2
+ (espeak --stdout -a $a -k $k -p $p -v $v -g $g | aplay)<<EOF
+$*
+EOF
+}
+
+case "$1" in
+ (--help) echo say something with espeak ;;
+ (-d|--debug) shift; debug=true speak "$@";;
+ (-v|--verbose) shift; verbose=true speak "$@";;
+ (*) speak "$@";;
+esac
diff --git a/.graveyard/noise/modules/help b/.graveyard/noise/modules/help
new file mode 100755
index 00000000..0763f3a0
--- /dev/null
+++ b/.graveyard/noise/modules/help
@@ -0,0 +1,24 @@
+#! /bin/sh
+case "$1" in
+ (-*) : ;; # ignore all options
+ ('') { for directory in `echo "$NOISE_PATH" | tr : \ ` ; do
+ for module in "$directory"/* ; do
+ echo `basename "$module"` `$module --help`
+ done 2>/dev/null
+ done
+ ## print all documented built-in commands
+ sed -n 's:^noise_\([a-z]\+\)() { # \(.\+\)\?$:\1 \2:p' "$NOISE"
+ } | sort | uniq | sed -n '
+ $s/$//
+ s:^\([a-z]\+\) \(.\+\):type /\1 to \2:p' ;;
+ (*)
+ ## call
+ for directory in `echo "$NOISE_PATH" | tr : \ ` ; do
+ for module in "$directory/$1" ; do
+ if test -e $module ; then
+ shift
+ exec $module --help --verbose "$@" 2>&1
+ fi
+ done
+ done
+esac
diff --git a/.graveyard/noise/modules/join b/.graveyard/noise/modules/join
new file mode 100755
index 00000000..68afcb66
--- /dev/null
+++ b/.graveyard/noise/modules/join
@@ -0,0 +1,15 @@
+#! /bin/sh
+
+case "$1" in
+ (--help) echo set default_command to chat and join channel ;;
+ (*)
+ . /tmp/noise/$NOISE_pid/environment
+ nick="${chat_nick-$NOISE_pid}"
+ echo /send_to_channel "${1-#23}" "$nick" joined the channel >$NOISE_linefeed
+ echo /set default_command chat >$NOISE_linefeed
+ echo /set chat_channel "${1-#23}" >$NOISE_linefeed
+ echo " joined channel ${1-#23}"
+ echo /part to go back to espeak ;;
+
+
+esac
diff --git a/.graveyard/noise/modules/lang b/.graveyard/noise/modules/lang
new file mode 100755
index 00000000..07b6802e
--- /dev/null
+++ b/.graveyard/noise/modules/lang
@@ -0,0 +1,22 @@
+#! /bin/sh
+
+case "$1" in
+ (--help)
+ echo "set language or list available languages" ;;
+ (list)
+ espeak --voices | sed -n '1!p' | awk '{\
+ printf"/lang %s set lang to %s\n",$2,$4
+ }' ;;
+ ('')
+ echo /set lang >$NOISE_linefeed ;;
+ (*)
+ if test -z "$2" ; then
+ echo /set lang "$1"
+ else
+ echo /set lang "$1"
+ shift
+ echo "$*"
+ echo /set lang "${noise_lang-de}"
+ fi >$NOISE_linefeed
+esac
+
diff --git a/.graveyard/noise/modules/licht b/.graveyard/noise/modules/licht
new file mode 120000
index 00000000..7f170fe2
--- /dev/null
+++ b/.graveyard/noise/modules/licht
@@ -0,0 +1 @@
+/krebs/god/licht \ No newline at end of file
diff --git a/.graveyard/noise/modules/mpc b/.graveyard/noise/modules/mpc
new file mode 100755
index 00000000..20abf19b
--- /dev/null
+++ b/.graveyard/noise/modules/mpc
@@ -0,0 +1,14 @@
+#! /bin/sh
+
+case "$1" in
+ (--help)
+ case "$2" in
+ (--verbose) mpc --help ;;
+ (*) echo access mpd
+ esac ;;
+ (*)
+ ##echo test-module called with following arguments: "$@"
+ ## send command for re-evaluation:
+ ##echo /espeak test >$NOISE_linefeed
+ MPD_HOST=filebitch.shack mpc $@
+esac
diff --git a/.graveyard/noise/modules/names b/.graveyard/noise/modules/names
new file mode 100755
index 00000000..f5922064
--- /dev/null
+++ b/.graveyard/noise/modules/names
@@ -0,0 +1,22 @@
+#! /bin/sh
+
+case "$1" in
+ (--help) echo send text to everyone with @@ prepended ;;
+ (*)
+ cd /tmp/noise
+ . $NOISE_pid/environment
+ if test "$default_command" != chat ; then exit ; fi
+ nick="${chat_nick-$NOISE_pid}"
+ channel="${1-$chat_channel}"
+ echo "Users in channel $channel"
+ for client in * ; do
+ . $client/environment
+ chat_nick="${chat_nick-$client}"
+ if test "$channel" = "$chat_channel" && test "$default_command" = chat ; then
+ echo "$chat_nick"
+ fi
+ unset chat_nick
+ unset chat_channel
+ unset default_command
+ done
+esac
diff --git a/.graveyard/noise/modules/nick b/.graveyard/noise/modules/nick
new file mode 100755
index 00000000..5ed1e9d9
--- /dev/null
+++ b/.graveyard/noise/modules/nick
@@ -0,0 +1,10 @@
+#! /bin/sh
+
+case "$1" in
+ (--help) echo send text to everyone with @@ prepended ;;
+ (*)
+ . /tmp/noise/$NOISE_pid/environment
+ nick="${chat_nick-$NOISE_pid}"
+ echo /send_to_channel $chat_channel $nick is now known as $1 > $NOISE_linefeed
+ echo /set chat_nick $1 >$NOISE_linefeed;;
+esac
diff --git a/.graveyard/noise/modules/overlord b/.graveyard/noise/modules/overlord
new file mode 100755
index 00000000..ded8627a
--- /dev/null
+++ b/.graveyard/noise/modules/overlord
@@ -0,0 +1,14 @@
+#! /bin/sh
+set -euf
+
+# cd //
+cd $(dirname $(readlink -f $0))/../..
+
+case "${1---help}" in
+ --help)
+ echo "Make an announcement! Usage: /overlord <text>"
+ ;;
+ *)
+ exec god/overlord/index "$@"
+ ;;
+esac
diff --git a/.graveyard/noise/modules/part b/.graveyard/noise/modules/part
new file mode 100755
index 00000000..d35ac501
--- /dev/null
+++ b/.graveyard/noise/modules/part
@@ -0,0 +1,15 @@
+#! /bin/sh
+
+case "$1" in
+ (--help) echo leave chat mode ;;
+ (*)
+ . /tmp/noise/$NOISE_pid/environment
+ nick="${chat_nick-$NOISE_pid}"
+
+ echo "/send_to_channel $chat_channel $nick has quit ${*-no reason}" > $NOISE_linefeed
+
+ echo /set default_command espeak >$NOISE_linefeed
+ echo "disabled chat mode (set back to espeak)" ;;
+
+
+esac
diff --git a/.graveyard/noise/modules/ping b/.graveyard/noise/modules/ping
new file mode 100755
index 00000000..acf2529f
--- /dev/null
+++ b/.graveyard/noise/modules/ping
@@ -0,0 +1,24 @@
+#! /bin/sh
+cd /tmp/noise
+case "$1" in
+ (--help) : ;;
+ ('')
+ . $NOISE_pid/environment
+ ping_timestamp=${ping_timestamp-0}
+ ping_challenger=${ping_challenger-0}
+ if test $ping_challenger != 0 ; then
+ echo There is already a ping challange running
+ else
+ timestamp=`date +%s%N`
+ for client in * ; do
+ echo /ping $NOISE_pid $timestamp >$client/linefeed &
+ done
+ fi
+ ;;
+ (*)
+ echo "/set -q ping_timestamp $2" >$NOISE_pid/linefeed
+ if test $NOISE_pid != $1 ; then
+ echo "/set -q ping_challenger $1" >$NOISE_pid/linefeed
+ echo "PING?"
+ fi
+esac
diff --git a/.graveyard/noise/modules/play b/.graveyard/noise/modules/play
new file mode 100755
index 00000000..180c1e0c
--- /dev/null
+++ b/.graveyard/noise/modules/play
@@ -0,0 +1,36 @@
+#! /bin/sh
+case "$1" in
+ (--help)
+ echo "play an audio file" ;;
+ (*)
+ exec 2>&1
+ ffs='wav mp3 ogg asf flac'
+
+ if test -z "$*" ; then
+ ls $HOME/noise/samples | sed '
+ s:\.\('"`echo "$ffs" | tr \ \|`"'\)$: \1:
+ s:^:/play :
+ s:.*:&:
+ '
+ else
+ for i in $ffs ; do
+ f=$HOME/noise/samples/$1.$i
+ test -f "$f" &&
+ case "$i" in
+ wav) aplay "$f" & ;;
+ *) mplayer "$f" & ;;
+ esac && break
+ done || cat<<EOF
+\
+Keine Audiodatei mit dem Namen
+
+ $1.EXT
+
+gefunden... am besten gleich uploaden:
+
+ scp NAME shack@shack.shack:$HOME/noise/samples/
+
+folgende Dateiendungen werden erkannt: $ffs
+EOF
+ fi
+esac
diff --git a/.graveyard/noise/modules/pong b/.graveyard/noise/modules/pong
new file mode 100755
index 00000000..eb2df46d
--- /dev/null
+++ b/.graveyard/noise/modules/pong
@@ -0,0 +1,26 @@
+#! /bin/sh
+cd /tmp/noise
+case "$1" in
+ (--help) : ;;
+ ('')
+ . $NOISE_pid/environment
+ ping_timestamp=${ping_timestamp-0}
+ ping_challenger=${ping_challenger-0}
+ if test $ping_challenger = 0 ; then
+ echo There is no ping challange running
+ else
+ timestamp=`date +%s%N`
+ echo /pong $NOISE_pid $timestamp >$ping_challenger/linefeed
+ ## reset ping TODO /unset
+ echo /set -q ping_timestamp 0 >$NOISE_pid/linefeed
+ echo /set -q ping_challenger 0 >$NOISE_pid/linefeed
+ fi
+ ;;
+ (*)
+ . $1/environment
+ # XXX is attendee the right counterpart to 'challenger'?
+ attendee_nick=$chat_nick
+ . $NOISE_pid/environment
+ time=`echo "scale=3; ($2 - $ping_timestamp)/10^9" | bc`
+ echo "PONG! $attendee_nick ${time}s"
+esac
diff --git a/.graveyard/noise/modules/query b/.graveyard/noise/modules/query
new file mode 100755
index 00000000..ceeff8a5
--- /dev/null
+++ b/.graveyard/noise/modules/query
@@ -0,0 +1,23 @@
+#! /bin/sh
+
+case "$1" in
+ (--help) echo send a message to a specific user ;;
+ (*)
+ cd /tmp/noise
+ . $NOISE_pid/environment
+ nick="${chat_nick-$NOISE_pid}"
+ target="$1"
+ shift
+ for client in * ; do
+ . $client/environment
+ if test "$target" = "${chat_nick-$client}" ; then
+ echo "/echo <-- $nick: $*" > $client/linefeed
+ echo "--> $target: $*"
+ exit
+ fi
+ unset chat_channel
+
+ done
+
+ echo "$nick not found"
+esac
diff --git a/.graveyard/noise/modules/send_to_channel b/.graveyard/noise/modules/send_to_channel
new file mode 100755
index 00000000..4a0470af
--- /dev/null
+++ b/.graveyard/noise/modules/send_to_channel
@@ -0,0 +1,17 @@
+#! /bin/sh
+
+case "$1" in
+ (--help) : ;;
+ (*)
+ cd /tmp/noise
+ channel="$1"
+ shift
+ for client in * ; do
+ . $client/environment
+ if test "$channel" = "$chat_channel" && test "$default_command" = chat ; then
+ echo "/echo $*" > $client/linefeed
+ fi
+ unset chat_channel
+
+ done
+esac
diff --git a/.graveyard/noise/modules/sendmail b/.graveyard/noise/modules/sendmail
new file mode 100755
index 00000000..182d96e3
--- /dev/null
+++ b/.graveyard/noise/modules/sendmail
@@ -0,0 +1,55 @@
+#!/usr/bin/python
+import os,sys,smtplib,string
+'''
+ Mail Plugin for the noise telnet suite
+ See: http://docs.python.org/library/smtplib.html
+ Author: Felix
+'''
+
+# help
+if len(sys.argv) == 2:
+ if sys.argv[1] == "--help":
+ print "send an e-mail ( \"TO(s)\" \"SUBJECT\" [string instead of EOF])"
+ sys.exit(0)
+
+# sanity
+if len(sys.argv) <= 2:
+ print "wrong number of parameters, see help"
+ sys.exit(1)
+
+# write variables
+# check of EOF
+if len(sys.argv) == 4 :
+ EOFstring="%s\n"% sys.argv[3]
+else:
+ EOFstring="EOF\n"
+
+fromaddr=u"Karl Koch<shockspasm@googlemail.com>"
+toaddrs=sys.argv[1]
+subject=sys.argv[2]
+
+
+#write header:
+msg = u"From: %s\r\nTo: %s\r\nSubject: %s\r\n\r\n" % (fromaddr, toaddrs,subject)
+print "Write your text now, finish with %s" % EOFstring
+sys.stdout.flush() # flushing is important to make sure the line is written
+
+while 1:
+ try:
+ line = sys.stdin.readline()
+ if line == EOFstring:
+ break
+ msg = msg + line
+ except EOFError:
+ break
+
+msg = msg + "[!] Written with NOISE telnet"
+
+print "Thank you for your message! Delivering it now..."
+sys.stdout.flush()
+server = smtplib.SMTP('localhost')
+#server.set_debuglevel(1)
+server.sendmail(fromaddr,toaddrs.split(','),msg)
+server.quit()
+print "mail send successfully"
+sys.exit(0)
diff --git a/.graveyard/noise/modules/shackstatus b/.graveyard/noise/modules/shackstatus
new file mode 100755
index 00000000..a5058f0a
--- /dev/null
+++ b/.graveyard/noise/modules/shackstatus
@@ -0,0 +1,104 @@
+#! /bin/bash
+
+main() {
+ case "$1" in
+ (--help)
+ echo "report status of all shack services."
+ ;;
+ (*)
+ test "$(dig +short localhost @10.42.0.10 )" = "127.0.0.1" &&
+ STAT_DNS_I="läuft" || STAT_DNS_I="antwortet nicht"
+ test "$(dig +short shackspace.de @10.42.0.10 )" = "141.31.176.214" &&
+ STAT_DNS_E="läuft" || STAT_DNS_E="antwortet nicht"
+ test "$(dig +short shackspace.de @141.31.176.214 )" = "141.31.176.214" &&
+ STAT_DNS_X="läuft"|| STAT_DNS_X="antwortet nicht"
+
+ STAT_LINE=$(ping -c 5 -i 0.2 -q 141.31.176.214 |
+ awk '/packet loss/ { print 100-$6}' )
+
+ cat <<-EOF >$NOISE_linefeed
+ /set pitch 10
+ /espeak -v Hallo - Ich bin Krebs.
+ /espeak -v Heute ist `wochentag`, der `tag` --- `monat` -- `date +%Y`
+ /zeit
+ /espeak -v tcheck der systeme:
+ /espeak -v Energie versorgung -- aktiv
+ /espeak -v shackhost -- läuft
+ /espeak -v telnet -- läuft
+ /espeak -v interner - D N S -- interne - do-mejn -- $STAT_DNS_I
+ /espeak -v interner - D N S -- externe - do-mejn -- $STAT_DNS_E
+ /espeak -v externer - D N S - $STAT_DNS_X
+ /espeak -v Leitungsqualität - $STAT_LINE prozent.
+ /temp
+ /espeak -v krebs kompjuting bereit
+ EOF
+ ;;
+ esac 2>&1
+}
+
+wochentag() {
+ case $(date +%a) in
+ (Mon) echo Montag ;;
+ (Tue) echo Dienstag ;;
+ (Wed) echo Mittwoch ;;
+ (Thu) echo Donnerstag ;;
+ (Fri) echo Freitag ;;
+ (Sat) echo Samstag ;;
+ (Sun) echo Sonntag ;;
+ esac
+}
+
+tag() {
+ case $(date +%d) in
+ (1) echo erste ;;
+ (2) echo zweite ;;
+ (3) echo dritte ;;
+ (4) echo vierte ;;
+ (5) echo fünfte ;;
+ (6) echo sechste ;;
+ (7) echo siebte ;;
+ (8) echo achte ;;
+ (9) echo neunte ;;
+ (10) echo zehnte ;;
+ (11) echo elfte ;;
+ (12) echo zwölfte ;;
+ (13) echo dreizehnte ;;
+ (14) echo vierzehnte ;;
+ (15) echo fünfzehnte ;;
+ (16) echo sechzehnte ;;
+ (17) echo siebzehnte ;;
+ (18) echo achtzehnte ;;
+ (19) echo neunzehnte ;;
+ (20) echo zwanzigste ;;
+ (21) echo einundzwanzigste ;;
+ (22) echo zweiundzwanzigste ;;
+ (23) echo dreiundzwanzigste ;;
+ (24) echo vierundzwanzigste ;;
+ (25) echo füfundzwanzigste ;;
+ (26) echo sechsundzwanzigste ;;
+ (27) echo siebenundzwanzigste ;;
+ (28) echo achtundzwanzigste ;;
+ (29) echo neunundzwanzigste ;;
+ (30) echo dreissigste ;;
+ (31) echo einunddreissigste ;;
+ esac
+}
+
+monat() {
+ case $(date +%b) in
+ (Jan) echo Januar ;;
+ (Feb) echo Februar ;;
+ (Mar) echo März ;;
+ (Apr) echo April ;;
+ (May) echo Mai ;;
+ (Jun) echo Juni ;;
+ (Jul) echo Juli ;;
+ (Aug) echo August ;;
+ (Sep) echo September ;;
+ (Oct) echo Oktober ;;
+ (Nov) echo November ;;
+ (Dec) echo Dezember ;;
+ esac
+}
+
+main "$@"
diff --git a/.graveyard/noise/modules/sleep b/.graveyard/noise/modules/sleep
new file mode 100755
index 00000000..89712cac
--- /dev/null
+++ b/.graveyard/noise/modules/sleep
@@ -0,0 +1,10 @@
+#! /bin/sh
+case "$1" in
+ (--help) echo "pause for NUMBER seconds" ;;
+ (*)
+ if echo "$1" | grep -Eq '^([0-9]+(\.[0-9]*)?|[0-9]*\.[0-9]+)$' ; then
+ sleep "$1"
+ else
+ echo 'FAIL: $1 is not a number'
+ fi
+esac
diff --git a/.graveyard/noise/modules/stream b/.graveyard/noise/modules/stream
new file mode 100755
index 00000000..476ffff9
--- /dev/null
+++ b/.graveyard/noise/modules/stream
@@ -0,0 +1,2 @@
+#!/bin/sh
+sudo -u krebs /krebs/streams/streams "$@"
diff --git a/.graveyard/noise/modules/temp b/.graveyard/noise/