ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/ext/widget.ext
(Generate patch)

Comparing deliantra/server/ext/widget.ext (file contents):
Revision 1.3 by root, Tue Jun 26 04:50:05 2007 UTC vs.
Revision 1.4 by root, Mon Jul 2 03:15:30 2007 UTC

14 14
15cf::client->attach ( 15cf::client->attach (
16 on_connect => sub { 16 on_connect => sub {
17 my ($ns) = @_; 17 my ($ns) = @_;
18 18
19 Scalar::Util::weaken (my $weakns = $ns);
20
19 $ns->{id} = "a"; 21 $ns->{id} = "a";
22 $ns->{json_coder}->filter_json_single_key_object (__widget_ref__ => sub {
23 # cannot deserialise ATM
24 undef
25 });
20 }, 26 },
21); 27);
22 28
23sub csc_update_stats { 29sub csc_update_stats {
24 my ($ns) = @_; 30 my ($ns) = @_;
150sub msg { 156sub msg {
151 my ($self, $type, %msg) = @_; 157 my ($self, $type, %msg) = @_;
152 158
153 if (my $ns = shift->{ns}) { 159 if (my $ns = shift->{ns}) {
154 $msg{msgtype} = $type; 160 $msg{msgtype} = $type;
155 $ns->send_packet ("ext " . cf::to_json \%msg); 161 $ns->send_packet ("ext " . $ns->{json_coder}->encode (\%msg));
156 } 162 }
157} 163}
158 164
159sub new { 165sub new {
160 my ($self, $class, %args) = @_; 166 my ($self, $class, %args) = @_;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines