… | |
… | |
50 | }, |
50 | }, |
51 | on_activate => sub { |
51 | on_activate => sub { |
52 | my ($input, $text) = @_; |
52 | my ($input, $text) = @_; |
53 | $input->set_text (''); |
53 | $input->set_text (''); |
54 | |
54 | |
|
|
55 | return unless $::CONN; |
|
|
56 | |
55 | if ($text =~ /^\/(.*)/) { |
57 | if ($text =~ /^\/(.*)/) { |
56 | $::CONN->user_send ($1); |
58 | $::CONN->user_send ($1); |
57 | } else { |
59 | } else { |
58 | my $say_cmd = $self->{say_command}; |
60 | my $say_cmd = $self->{say_command}; |
59 | if ($say_cmd eq '') { |
|
|
60 | $::CONN->user_send ($text); |
|
|
61 | } else { |
|
|
62 | $::CONN->user_send ("$say_cmd $text"); |
61 | $::CONN->user_send ($say_cmd . $text); |
63 | } |
|
|
64 | } |
62 | } |
65 | if ($input->{refocus_map}) { |
63 | if ($input->{refocus_map}) { |
66 | delete $input->{refocus_map}; |
64 | delete $input->{refocus_map}; |
67 | $::MAPWIDGET->focus_in |
65 | $::MAPWIDGET->focus_in |
68 | } |
66 | } |