ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/lib/cf.pm
(Generate patch)

Comparing deliantra/server/lib/cf.pm (file contents):
Revision 1.589 by root, Sun Nov 4 01:01:13 2012 UTC vs.
Revision 1.590 by root, Sun Nov 4 02:20:11 2012 UTC

3235=cut 3235=cut
3236 3236
3237sub cf::client::ext_msg($$@) { 3237sub cf::client::ext_msg($$@) {
3238 my ($self, $type, @msg) = @_; 3238 my ($self, $type, @msg) = @_;
3239 3239
3240 if ($self->extcmd == 2) {
3241 $self->send_big_packet ("ext " . $self->{json_coder}->encode ([$type, @msg])); 3240 $self->send_big_packet ("ext " . $self->{json_coder}->encode ([$type, @msg]));
3242 } elsif ($self->extcmd == 1) { # TODO: remove
3243 push @msg, msgtype => "event_$type";
3244 $self->send_big_packet ("ext " . $self->{json_coder}->encode ({@msg}));
3245 }
3246} 3241}
3247 3242
3248=item $client->ext_reply ($msgid, @msg) 3243=item $client->ext_reply ($msgid, @msg)
3249 3244
3250Sends an ext reply to the client. 3245Sends an ext reply to the client.
3251 3246
3252=cut 3247=cut
3253 3248
3254sub cf::client::ext_reply($$@) { 3249sub cf::client::ext_reply($$@) {
3255 my ($self, $id, @msg) = @_; 3250 my ($self, $id, @msg) = @_;
3256
3257 return unless $self->extcmd == 2;
3258 3251
3259 $self->send_big_packet ("ext " . $self->{json_coder}->encode (["reply-$id", @msg])); 3252 $self->send_big_packet ("ext " . $self->{json_coder}->encode (["reply-$id", @msg]));
3260} 3253}
3261 3254
3262=item $success = $client->query ($flags, "text", \&cb) 3255=item $success = $client->query ($flags, "text", \&cb)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines