Scripts archive: system uptime instead of oer uptime
#
# uptime.pl
#
OerPerl::add_command_handler("uptime", "my_commandhandler_uptime");
sub my_commandhandler_uptime
{
my($command, $target, $nick, $userhost, $args) = @_;
my $tochan = OerPerl::is_valid_channel($target) ? 1 : 0;
my $target_type = $tochan ? OerPerl::CHANNEL : OerPerl::USER;
my $uptime;
$uptime = `uptime`;
OerPerl::sendto($tochan ? $target : $nick, $target_type, "uptime: $uptime");
return OerPerl::BLOCK_OER_COMMAND;
}
