|
Revision 53, 509 bytes
(checked in by bkuhn, 10 months ago)
|
- Added SFLC's internally developed tim bot released under AGPLv3
|
| Line | |
|---|
| 1 |
#!/usr/bin/perl -w |
|---|
| 2 |
|
|---|
| 3 |
=head1 NAME |
|---|
| 4 |
|
|---|
| 5 |
tailbot |
|---|
| 6 |
|
|---|
| 7 |
=head1 DESCRIPTION |
|---|
| 8 |
|
|---|
| 9 |
from the fbi bot by richardc, tails a file called 'logfile' to the channel |
|---|
| 10 |
#tailbot. |
|---|
| 11 |
|
|---|
| 12 |
=cut |
|---|
| 13 |
|
|---|
| 14 |
use warnings; |
|---|
| 15 |
use strict; |
|---|
| 16 |
|
|---|
| 17 |
package TailBot; |
|---|
| 18 |
use base 'Bot::BasicBot'; |
|---|
| 19 |
|
|---|
| 20 |
my $channel = '#tailbot'; |
|---|
| 21 |
|
|---|
| 22 |
sub connected { |
|---|
| 23 |
my $self = shift; |
|---|
| 24 |
$self->forkit({ channel => $channel, |
|---|
| 25 |
run => [ qw( /usr/bin/tail -f logfile ) ], |
|---|
| 26 |
}); |
|---|
| 27 |
} |
|---|
| 28 |
|
|---|
| 29 |
package main; |
|---|
| 30 |
|
|---|
| 31 |
TailBot->new(nick => 'tailbot', channels => [ $channel ]) |
|---|
| 32 |
->run; |
|---|