From: Harvie Date: Mon, 21 Feb 2011 11:50:45 +0000 (+0100) Subject: Improved 10-menu.pl X-Git-Url: http://git.harvie.cz/?p=mirrors%2Flibpurple-core-answerscripts.git;a=commitdiff_plain;h=43bde8b4bec9f5c8dd13ca799ddae4a9e741b630;hp=7f54aeea04518240219b8c8c4b3a36903a842dad Improved 10-menu.pl --- diff --git a/purple/answerscripts.d/10-menu.pl b/purple/answerscripts.d/10-menu.pl index d055f84..f9bf7f7 100755 --- a/purple/answerscripts.d/10-menu.pl +++ b/purple/answerscripts.d/10-menu.pl @@ -8,6 +8,8 @@ given ($ENV{ANSW_MSG}) { when (/^!help$/) { print qx{ grep -o 'when \(/[^\$/]*' "$0" | grep -o '!.*' | tr '\n' ',' }; } when (/^!ping$/) { print "PONG"; } when (/^!whoami$/) { print "You are: $ENV{ANSW_FROM}"; } + when (/^!whoareyou$/) { print "Hello, my name is $ENV{ANSW_LOCAL_NAME} ;-)"; } + when (/^!version$/) { print "$ENV{ANSW_AGENT} $ENV{ANSW_AGENT_VERSION}"; } when (/^!status$/) { print "[$ENV{ANSW_STATUS}] $ENV{ANSW_STATUS_MSG}"; } when (/^!(reboot|reset|restart|halt)$/) { print "Broadcast message: The system is going down for reboot NOW !!"; } when (/^!google/) { print "UTFG Yourself: http://google.com/"; }