3
0
mirror of https://github.com/pragma-/pbot.git synced 2024-11-07 04:29:32 +01:00
pbot/PBot/IRC/EventQueue/Entry.pm

41 lines
561 B
Perl
Raw Normal View History

package PBot::IRC::EventQueue::Entry; # pragma_ 2011/21/01
2019-06-26 18:34:19 +02:00
use strict;
2019-06-26 18:34:19 +02:00
my $id = 0;
2019-06-26 18:34:19 +02:00
sub new {
my $class = shift;
my $time = shift;
my $content = shift;
2019-06-26 18:34:19 +02:00
my $self = {
'time' => $time,
'content' => $content,
'id' => "$time:" . $id++,
};
2019-06-26 18:34:19 +02:00
bless $self, $class;
return $self;
}
2019-06-26 18:34:19 +02:00
sub id {
my $self = shift;
return $self->{'id'};
}
2019-06-26 18:34:19 +02:00
sub time {
my $self = shift;
$self->{'time'} = $_[0] if @_;
return $self->{'time'};
}
2019-06-26 18:34:19 +02:00
sub content {
my $self = shift;
$self->{'content'} = $_[0] if @_;
return $self->{'content'};
}
2019-06-26 18:34:19 +02:00
1;