This irssi script creates a new command to close all open queries at once. I don't know what else to explain here, i think the script explains itself.
use strict;
use warnings;
use Irssi;
use Glib;
use POE qw(Loop::Glib Session::Irssi);
my $VERSION = '0.1';
my %IRSSI = (
authors => 'Johannes Plunien',
contact => 'http://www.pqpq.de/contact/',
license => 'Perl',
);
POE::Session::Irssi->create(
irssi_commands => {
qc => sub {
foreach my $w (Irssi::windows()) {
my $act = $w->{active};
next unless defined $act->{type};
$w->command("window close") if $act->{type} eq 'QUERY';
}
},
},
);

Leave a comment