… | |
… | |
2633 | |
2633 | |
2634 | =cut |
2634 | =cut |
2635 | |
2635 | |
2636 | our %CHANNEL = ( |
2636 | our %CHANNEL = ( |
2637 | "c/identify" => { |
2637 | "c/identify" => { |
2638 | id => "identify", |
2638 | id => "infobox", |
2639 | title => "Identify", |
2639 | title => "Identify", |
2640 | reply => undef, |
2640 | reply => undef, |
2641 | tooltip => "Items recently identified", |
2641 | tooltip => "Items recently identified", |
2642 | }, |
2642 | }, |
2643 | "c/examine" => { |
2643 | "c/examine" => { |
2644 | id => "examine", |
2644 | id => "infobox", |
2645 | title => "Examine", |
2645 | title => "Examine", |
2646 | reply => undef, |
2646 | reply => undef, |
2647 | tooltip => "Signs and other items you examined", |
2647 | tooltip => "Signs and other items you examined", |
2648 | }, |
2648 | }, |
|
|
2649 | "c/lookat" => { |
|
|
2650 | id => "infobox", |
|
|
2651 | title => "Look", |
|
|
2652 | reply => undef, |
|
|
2653 | tooltip => "What you saw there", |
|
|
2654 | }, |
2649 | ); |
2655 | ); |
2650 | |
2656 | |
2651 | sub cf::client::send_msg { |
2657 | sub cf::client::send_msg { |
2652 | my ($self, $channel, $msg, $color, @extra) = @_; |
2658 | my ($self, $channel, $msg, $color, @extra) = @_; |
2653 | |
2659 | |
2654 | $msg = $self->pl->expand_cfpod ($msg); |
2660 | $msg = $self->pl->expand_cfpod ($msg); |
2655 | |
2661 | |
2656 | $color &= cf::NDI_CLIENT_MASK; # just in case... |
2662 | $color &= cf::NDI_CLIENT_MASK; # just in case... |
2657 | |
2663 | |
2658 | # check predefined channels, for the benefit of C |
2664 | # check predefined channels, for the benefit of C |
2659 | $channel = $CHANNEL{$channel} if $CHANNEL{$channel}; |
2665 | if ($CHANNEL{$channel}) { |
|
|
2666 | $channel = $CHANNEL{$channel}; |
2660 | |
2667 | |
|
|
2668 | $self->ext_msg (channel_info => $channel) |
|
|
2669 | if $self->can_msg; |
|
|
2670 | |
|
|
2671 | $channel = $channel->{id}; |
|
|
2672 | |
2661 | if (ref $channel) { |
2673 | } elsif (ref $channel) { |
2662 | # send meta info to client, if not yet sent |
2674 | # send meta info to client, if not yet sent |
2663 | unless (exists $self->{channel}{$channel->{id}}) { |
2675 | unless (exists $self->{channel}{$channel->{id}}) { |
2664 | $self->{channel}{$channel->{id}} = $channel; |
2676 | $self->{channel}{$channel->{id}} = $channel; |
2665 | $self->ext_msg (channel_info => $channel) |
2677 | $self->ext_msg (channel_info => $channel) |
2666 | if $self->can_msg; |
2678 | if $self->can_msg; |