Ported all scripts from PURPLE_ to ANSW_ prefix. Added examples to support STATUS...
authorHarvie <tomas@mudrunka.cz>
Tue, 24 Aug 2010 00:54:13 +0000 (02:54 +0200)
committerHarvie <tomas@mudrunka.cz>
Tue, 24 Aug 2010 00:54:13 +0000 (02:54 +0200)
purple/answerscripts.d/autokiss.sh
purple/answerscripts.d/debug.sh
purple/answerscripts.d/espeak.sh
purple/answerscripts.d/menu.pl
purple/answerscripts.d/repeat.sh

index b054c5c..46dc712 100755 (executable)
@@ -1,3 +1,3 @@
 #!/bin/sh
 #AutoKiss :-* (just wanna be polite)
-echo "$PURPLE_MSG" | grep -o ':-\*';
+echo $(echo "$ANSW_MSG" | grep -Eo ':-\*|\*IN LOVE\*|:-\{\}|\*KISSING\*');
index 021c713..ad2ddb7 100755 (executable)
@@ -1,3 +1,4 @@
 #!/bin/sh
 #Debug
-echo "<$PURPLE_FROM> $PURPLE_MSG" >&2;
+echo "<$ANSW_FROM> $ANSW_MSG" >&2;
+echo "($ANSW_STATUS: $ANSW_STATUS_MSG)" >&2;
index c0dec78..0e785bf 100755 (executable)
@@ -1,3 +1,3 @@
 #!/bin/sh
 #Say it loudly and proudly!
-test -x "$(which espeak)" && echo "$PURPLE_MSG" | espeak -v $(echo "$LANG" | head -c 2) &
+test -x "$(which espeak)" && echo "$ANSW_MSG" | espeak -v $(echo "$LANG" | head -c 2) &
index 5c0c593..d7afa4e 100755 (executable)
@@ -4,10 +4,10 @@ use strict;
 use warnings;
 use Switch;
 
-switch ($ENV{PURPLE_MSG}) {
+switch ($ENV{ANSW_MSG}) {
        case /^!help$/  { print "What did you expected? A help?! :-P"; }
        case /^!ping$/  { print "PONG"; }
-       case /^!whoami$/        { print "You are: $ENV{PURPLE_FROM}"; }
+       case /^!whoami$/        { print "You are: $ENV{ANSW_FROM}"; }
        case /^!(reboot|reset|restart|halt)$/   { print "Broadcast message: The system is going down for reboot NOW !!"; }
        case /^!google/ { print "UTFG Yourself: http://google.com/"; }
        case /^!uptime$/        { print qx{uptime}; }
index 0719cd8..ffd2076 100755 (executable)
@@ -1,3 +1,3 @@
 #!/bin/sh
 #Dumb libpurple core-answerscripts script. Hello world!
-echo "REPEAT:$PURPLE_FROM> $PURPLE_MSG";
+echo "REPEAT:$ANSW_FROM> $ANSW_MSG";
This page took 0.122652 seconds and 4 git commands to generate.