ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/Deliantra-Client/DC/Protocol.pm
(Generate patch)

Comparing deliantra/Deliantra-Client/DC/Protocol.pm (file contents):
Revision 1.91 by root, Sat Dec 9 02:21:25 2006 UTC vs.
Revision 1.92 by root, Sat Dec 9 21:26:46 2006 UTC

987 kw => { hi => 0, yes => 0, no => 0 }, 987 kw => { hi => 0, yes => 0, no => 0 },
988 has_close_button => 1, 988 has_close_button => 1,
989 @_, 989 @_,
990 ); 990 );
991 991
992 Scalar::Util::weaken (my $this = $self); 992 CFPlus::weaken (my $this = $self);
993 993
994 $self->connect (delete => sub { $this->destroy; 1 }); 994 $self->connect (delete => sub { $this->destroy; 1 });
995 995
996 # better use a pane... 996 # better use a pane...
997 $self->add (my $hbox = new CFPlus::UI::HBox); 997 $self->add (my $hbox = new CFPlus::UI::HBox);
1041}; 1041};
1042 1042
1043sub update_options { 1043sub update_options {
1044 my ($self) = @_; 1044 my ($self) = @_;
1045 1045
1046 Scalar::Util::weaken $self; 1046 CFPlus::weaken $self;
1047 1047
1048 $self->{options}->clear; 1048 $self->{options}->clear;
1049 $self->{options}->add ($self->{bye_button}); 1049 $self->{options}->add ($self->{bye_button});
1050 1050
1051 for my $kw (sort keys %{ $self->{kw} }) { 1051 for my $kw (sort keys %{ $self->{kw} }) {
1060} 1060}
1061 1061
1062sub feed { 1062sub feed {
1063 my ($self, $msg) = @_; 1063 my ($self, $msg) = @_;
1064 1064
1065 Scalar::Util::weaken $self; 1065 CFPlus::weaken $self;
1066 1066
1067 if ($msg->{msgtype} eq "reply") { 1067 if ($msg->{msgtype} eq "reply") {
1068 $self->{kw}{$_} = 1 for @{$msg->{add_topics} || []}; 1068 $self->{kw}{$_} = 1 for @{$msg->{add_topics} || []};
1069 $self->{kw}{$_} = 0 for @{$msg->{del_topics} || []}; 1069 $self->{kw}{$_} = 0 for @{$msg->{del_topics} || []};
1070 1070

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines