+ return {@_}, $class;
+}
+
+sub copy
+{
+ my $self = shift;
+ return $self->new(%$self);
+}
+
+sub addline
+{
+ my $self = shift;
+ my $dxchan = shift;
+ my $line = shift;
+
+ if (my @ans = BadWords::check($line)) {
+ return ($dxchan->msg('e17', @ans));
+ }
+ push @{$self->{lines}}, $line;
+ return ();
+}
+
+sub modline
+{
+ my $self = shift;
+ my $dxchan = shift;
+ my $no = shift;
+ my $line = shift;
+
+ if (my @ans = BadWords::check($line)) {
+ return ($dxchan->msg('e17', @ans));
+ }
+ ${$self->{lines}}[$no] = $line;
+ return ();
+}
+
+sub lines
+{
+ my $self = shift;
+ return exists $self->{lines} ? (@{$self->{lines}}) : ();
+}
+
+sub nolines
+{
+ my $self = shift;
+ return exists $self->{lines} ? scalar @{$self->{lines}} : 0;