d055f84eaa7cb6d1f421d21a4852d46f2e3ba8a5
2 #Just for you to see that you can use almost any language :-)
5 use v5
.10
; #given/when (if you need to use older PERL, you can find older version in GIT)
7 given ($ENV{ANSW_MSG
}) {
8 when (/^!help$/) { print qx{ grep -o
'when \(/[^\$/]*' "$0" | grep -o
'!.*' | tr
'\n' ',' }; }
9 when (/^!ping$/) { print "PONG"; }
10 when (/^!whoami$/) { print "You are: $ENV{ANSW_FROM}"; }
11 when (/^!status$/) { print "[$ENV{ANSW_STATUS}] $ENV{ANSW_STATUS_MSG}"; }
12 when (/^!(reboot|reset|restart|halt)$/) { print "Broadcast message: The system is going down for reboot NOW !!"; }
13 when (/^!google/) { print "UTFG Yourself: http://google.com/"; }
14 when (/^!uptime$/) { print qx{uptime
}; }
15 when (/^!date$/) { print qx{date
}; }
16 when (/^!dmesg$/) { print qx{ dmesg
| tail
-n
5 | tr
'\n' '\t' } }
This page took 0.273895 seconds and 3 git commands to generate.