mirror of
https://github.com/duncs/clusterssh.git
synced 2025-04-22 09:22:24 +00:00
Merge branch 'cqexbesd-random'
This commit is contained in:
commit
c07d283958
1 changed files with 17 additions and 0 deletions
|
@ -591,6 +591,15 @@ sub send_text_to_all_servers {
|
|||
}
|
||||
}
|
||||
|
||||
sub send_variable_text_to_all_servers($&) {
|
||||
my($self, $code) = @_;
|
||||
|
||||
foreach my $svr ( keys(%servers) ) {
|
||||
$self->send_text( $svr, $code->($svr) )
|
||||
if ( $servers{$svr}{active} == 1 );
|
||||
}
|
||||
}
|
||||
|
||||
sub send_resizemove($$$$$) {
|
||||
my ( $self, $win, $x_pos, $y_pos, $x_siz, $y_siz ) = @_;
|
||||
|
||||
|
@ -1868,6 +1877,14 @@ sub populate_send_menu {
|
|||
. $self->config->{macro_newline} );
|
||||
},
|
||||
);
|
||||
$menus{send}->command(
|
||||
-label => 'Random Number',
|
||||
-command => sub {
|
||||
$self->send_variable_text_to_all_servers(
|
||||
sub { int(rand(1024)) }
|
||||
),
|
||||
},
|
||||
);
|
||||
}
|
||||
else {
|
||||
$self->debug(
|
||||
|
|
Loading…
Add table
Reference in a new issue