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.27 by root, Wed Jun 7 07:00:30 2006 UTC vs.
Revision 1.29 by root, Sun Jun 11 18:36:15 2006 UTC

623 623
624sub player_update { 624sub player_update {
625 my ($self, $player) = @_; 625 my ($self, $player) = @_;
626 626
627 $::STATWIDS->{weight}->set_text (sprintf "Weight: %.1fkg", $player->{weight} / 1000); 627 $::STATWIDS->{weight}->set_text (sprintf "Weight: %.1fkg", $player->{weight} / 1000);
628}
628 629
629 # do it here because it is ignored earlier, and there is no "login" event 630sub logged_in {
631 my ($self) = @_;
632
633 $self->send_ext_req (cfplus => "version", "1", sub {
634 $self->{cfplus_ext} = $_[0];
635 });
636
630 $self->send_command ("output-sync $::CFG->{output_sync}"); 637 $self->send_command ("output-sync $::CFG->{output_sync}");
631 $self->send_command ("output-count $::CFG->{output_count}"); 638 $self->send_command ("output-count $::CFG->{output_count}");
632 $self->send_command ("pickup $::CFG->{pickup}") 639 $self->send_command ("pickup $::CFG->{pickup}");
640
641 my @yesno = ("<span foreground='red'>no</span>", "<span foreground='green'>yes</span>");
642
643 $::SERVER_INFO->set_markup (
644 "server name:port <tt>$self->{host}:$self->{port}</tt>\n"
645 . "protocol version <tt>$self->{version}</tt>\n"
646 . "mapinfo support $yesno[$self->{setup}{mapinfocmd} > 0]\n"
647 . "extcmd support $yesno[$self->{setup}{extcmd} > 0]\n"
648 . "cfplus support $yesno[$self->{cfplus_ext} > 0]\n"
649 );
633} 650}
634 651
6351; 6521;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines