Ported all scripts from PURPLE_ to ANSW_ prefix. Added examples to support STATUS...
[mirrors/libpurple-core-answerscripts.git] / purple / answerscripts.d / menu.pl
1 #!/usr/bin/env perl
2 #Just for you to see that you can use almost any language :-)
3 use strict;
4 use warnings;
5 use Switch;
6
7 switch ($ENV{ANSW_MSG}) {
8 case /^!help$/ { print "What did you expected? A help?! :-P"; }
9 case /^!ping$/ { print "PONG"; }
10 case /^!whoami$/ { print "You are: $ENV{ANSW_FROM}"; }
11 case /^!(reboot|reset|restart|halt)$/ { print "Broadcast message: The system is going down for reboot NOW !!"; }
12 case /^!google/ { print "UTFG Yourself: http://google.com/"; }
13 case /^!uptime$/ { print qx{uptime}; }
14 case /^!date$/ { print qx{date}; }
15 case /^!dmesg$/ { print qx{ dmesg | tail -n 5 | tr '\n' '^' } }
16 }
This page took 0.272303 seconds and 5 git commands to generate.