Skip to content

Instantly share code, notes, and snippets.

@plu
Created November 23, 2010 16:48
Show Gist options
  • Save plu/712084 to your computer and use it in GitHub Desktop.
Save plu/712084 to your computer and use it in GitHub Desktop.
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';
}
},
},
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment