dirkobot/lib/Bot/BasicBot/Pluggable/Module/Spam.pm
2011-07-02 18:11:06 -04:00

22 lines
588 B
Perl

package Bot::BasicBot::Pluggable::Module::Spam;
use strict;
use warnings;
use Data::Dumper;
use base qw(Bot::BasicBot::Pluggable::Module);
my $text = q{Enjoying Dirkocraft? Please consider a &9donation&4 to help out with hosting costs- &6It provides you with perks!&4 See the "Donation" link on &1dirkocraft.com&4 for details.};
sub help {return ""}
our $counter = 0;
sub tick { # called every 5 seconds
my $self = shift;
unless ($counter++ % 240) {# every 20 minutes, 240 * 5 seconds, spam the users
$self->say({body => $text, channel => "#dirkocraft-alert" });
};
}
1;