--- deliantra/Deliantra-Client/DC/Protocol.pm 2006/12/09 02:21:25 1.91 +++ deliantra/Deliantra-Client/DC/Protocol.pm 2007/03/16 02:33:49 1.94 @@ -630,6 +630,8 @@ [0.74, 0.65, 0.41], ); + my $fg = $color[$color % @color]; + $self->logprint ("info: ", $text); # try to create single paragraphs of multiple lines sent by the server @@ -639,12 +641,12 @@ $text =~ s/\[b\](.*?)\[\/b\]/\1<\/b>/g; $text =~ s/\[color=(.*?)\](.*?)\[\/color\]/\2<\/span>/g; - ::message ({ fg => $color[$color], markup => $_ }) + ::message ({ fg => $fg, markup => $_ }) for split /\n/, $text; $self->{statusbox}->add ($text, group => $text, - fg => $color[$color], + fg => $fg, timeout => $color >= 2 ? 180 : 10, tooltip_font => $::FONT_FIXED, ); @@ -928,6 +930,7 @@ $self->send_command ("output-sync $::CFG->{output_sync}"); $self->send_command ("output-count $::CFG->{output_count}"); + $self->send_command ("output-rate $::CFG->{output_rate}") if $::CFG->{output_rate} > 0; $self->send_command ("pickup $::CFG->{pickup}"); } @@ -989,7 +992,7 @@ @_, ); - Scalar::Util::weaken (my $this = $self); + CFPlus::weaken (my $this = $self); $self->connect (delete => sub { $this->destroy; 1 }); @@ -1043,7 +1046,7 @@ sub update_options { my ($self) = @_; - Scalar::Util::weaken $self; + CFPlus::weaken $self; $self->{options}->clear; $self->{options}->add ($self->{bye_button}); @@ -1062,7 +1065,7 @@ sub feed { my ($self, $msg) = @_; - Scalar::Util::weaken $self; + CFPlus::weaken $self; if ($msg->{msgtype} eq "reply") { $self->{kw}{$_} = 1 for @{$msg->{add_topics} || []};