From 53679fedeb1db9d68399638fc44aa4cf4ac5ee1c Mon Sep 17 00:00:00 2001 From: momo Date: Sat, 24 Sep 2011 19:28:07 +0200 Subject: //god/licht: add abstraction for specific toggles --- god/licht | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'god/licht') diff --git a/god/licht b/god/licht index 9284f622..12e4555f 100755 --- a/god/licht +++ b/god/licht @@ -56,7 +56,7 @@ toggle() { toggle_all() { for i in `seq 0 7` do - printf "\\xA5\\x5A\\x$i\\x$TOGGLE" | nc -u -w1 licht.shack 1337 & + toggle $i $TOGGLE done wait } @@ -64,7 +64,7 @@ toggle_all() { kuschel(){ for i in 0 2 do - printf "\\xA5\\x5A\\x$i\\x$TOGGLE" | nc -u -w1 licht.shack 1337 & + toggle $i $TOGGLE done wait } @@ -72,7 +72,7 @@ kuschel(){ software(){ for i in 1 3 do - printf "\\xA5\\x5A\\x$i\\x$TOGGLE" | nc -u -w1 licht.shack 1337 & + toggle $i $TOGGLE done wait } @@ -80,17 +80,19 @@ software(){ tische(){ for i in 4 6 do - printf "\\xA5\\x5A\\x$i\\x$TOGGLE" | nc -u -w1 licht.shack 1337 & + toggle $i $TOGGLE done wait } ghetto(){ - printf "\\xA5\\x5A\\x7\\x$TOGGLE" | nc -u -w1 licht.shack 1337 + i=7 + toggle $i $TOGGLE } porsche(){ - printf "\\xA5\\x5A\\x5\\x$TOGGLE" | nc -u -w1 licht.shack 1337 + i=5 + toggle $i $TOGGLE } case "$1" in -- cgit v1.2.3