… | |
… | |
2504 | the message, with C<log> being the default. If C<$color> is negative, suppress |
2504 | the message, with C<log> being the default. If C<$color> is negative, suppress |
2505 | the message unless the client supports the msg packet. |
2505 | the message unless the client supports the msg packet. |
2506 | |
2506 | |
2507 | =cut |
2507 | =cut |
2508 | |
2508 | |
|
|
2509 | our %CHANNEL = ( |
|
|
2510 | "c/identify" => { |
|
|
2511 | id => "identify", |
|
|
2512 | title => "Identify", |
|
|
2513 | reply => undef, |
|
|
2514 | tooltip => "Items recently identified", |
|
|
2515 | }, |
|
|
2516 | ); |
|
|
2517 | |
2509 | sub cf::client::send_msg { |
2518 | sub cf::client::send_msg { |
2510 | my ($self, $channel, $msg, $color, @extra) = @_; |
2519 | my ($self, $channel, $msg, $color, @extra) = @_; |
2511 | |
2520 | |
2512 | $msg = $self->pl->expand_cfpod ($msg); |
2521 | $msg = $self->pl->expand_cfpod ($msg); |
2513 | |
2522 | |
2514 | $color &= cf::NDI_CLIENT_MASK; # just in case... |
2523 | $color &= cf::NDI_CLIENT_MASK; # just in case... |
|
|
2524 | |
|
|
2525 | # check predefined channels, for the benefit of C |
|
|
2526 | $channel = $CHANNEL{$channel} if $CHANNEL{$channel}; |
2515 | |
2527 | |
2516 | if (ref $channel) { |
2528 | if (ref $channel) { |
2517 | # send meta info to client, if not yet sent |
2529 | # send meta info to client, if not yet sent |
2518 | unless (exists $self->{channel}{$channel->{id}}) { |
2530 | unless (exists $self->{channel}{$channel->{id}}) { |
2519 | $self->{channel}{$channel->{id}} = $channel; |
2531 | $self->{channel}{$channel->{id}} = $channel; |