… | |
… | |
15 | use Crossfire::Protocol::Base 0.95; |
15 | use Crossfire::Protocol::Base 0.95; |
16 | |
16 | |
17 | use base 'Crossfire::Protocol::Base'; |
17 | use base 'Crossfire::Protocol::Base'; |
18 | |
18 | |
19 | sub new { |
19 | sub new { |
20 | my $class = shift; |
20 | my ($class, %arg) = @_; |
21 | |
21 | |
22 | my $self = $class->SUPER::new (@_, |
22 | my $self = $class->SUPER::new (%arg, |
23 | setup_req => { |
23 | setup_req => { |
24 | extmap => 1, |
24 | extmap => 1, |
25 | smoothing => 1, |
25 | %{$arg{setup_req} || {}}, |
26 | }, |
26 | }, |
27 | ); |
27 | ); |
28 | |
28 | |
29 | $self->{map_widget}->clr_commands; |
29 | $self->{map_widget}->clr_commands; |
30 | |
30 | |
… | |
… | |
656 | |
656 | |
657 | my $fg = $color[$color % @color]; |
657 | my $fg = $color[$color % @color]; |
658 | |
658 | |
659 | $self->logprint ("info: ", $text); |
659 | $self->logprint ("info: ", $text); |
660 | |
660 | |
661 | # try to create single paragraphs of multiple lines sent by the server |
661 | ## try to create single paragraphs of multiple lines sent by the server |
|
|
662 | # no longer neecssary with TRT servers |
662 | $text =~ s/(?<=\S)\n(?=\w)/ /g; |
663 | #$text =~ s/(?<=\S)\n(?=\w)/ /g; |
663 | |
664 | |
664 | $text = CFPlus::asxml $text; |
665 | $text = CFPlus::asxml $text; |
665 | $text =~ s/\[b\](.*?)\[\/b\]/<b>\1<\/b>/g; |
666 | $text =~ s/\[b\](.*?)\[\/b\]/<b>\1<\/b>/g; |
666 | $text =~ s/\[color=(.*?)\](.*?)\[\/color\]/<span foreground='\1'>\2<\/span>/g; |
667 | $text =~ s/\[color=(.*?)\](.*?)\[\/color\]/<span foreground='\1'>\2<\/span>/g; |
667 | |
668 | |