… | |
… | |
183 | |
183 | |
184 | my $w = $self->{widget}{$id} |
184 | my $w = $self->{widget}{$id} |
185 | or return; |
185 | or return; |
186 | |
186 | |
187 | $self->send_exti_msg (w_r => $rid, [map $w->{$_}, @$attr]); |
187 | $self->send_exti_msg (w_r => $rid, [map $w->{$_}, @$attr]); |
|
|
188 | }); |
|
|
189 | |
|
|
190 | # message window |
|
|
191 | $self->connect_ext (channel_info => sub { |
|
|
192 | my ($info) = @_; |
|
|
193 | $self->{channels}->{$info->{id}} = $info; |
|
|
194 | $::MESSAGE_WINDOW->add_channel ($_[0]); |
188 | }); |
195 | }); |
189 | |
196 | |
190 | # destroy widgets on logout |
197 | # destroy widgets on logout |
191 | $self->{on_stop_game_guard} = $self->{map_widget}{root}->connect (stop_game => sub { |
198 | $self->{on_stop_game_guard} = $self->{map_widget}{root}->connect (stop_game => sub { |
192 | for my $ws (values %{delete $self->{widgetset} || {}}) { |
199 | for my $ws (values %{delete $self->{widgetset} || {}}) { |
… | |
… | |
889 | |
896 | |
890 | ## try to create single paragraphs of multiple lines sent by the server |
897 | ## try to create single paragraphs of multiple lines sent by the server |
891 | # no longer neecssary with TRT servers |
898 | # no longer neecssary with TRT servers |
892 | #$text =~ s/(?<=\S)\n(?=\w)/ /g; |
899 | #$text =~ s/(?<=\S)\n(?=\w)/ /g; |
893 | |
900 | |
894 | ::message ({ fg => $fg, markup => $_ }) |
901 | ::message ({ fg => $fg, markup => $_, type => $type }) |
895 | for split /\n/, $text; |
902 | for split /\n/, $text; |
896 | |
903 | |
897 | $self->{statusbox}->add ($text, |
904 | $self->{statusbox}->add ($text, |
898 | group => $text, |
905 | group => $text, |
899 | fg => $fg, |
906 | fg => $fg, |