irssi: Close all queries

| | Comments (0) | TrackBacks (0)
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';
            }
        },
    },
);

0 TrackBacks

Listed below are links to blogs that reference this entry: irssi: Close all queries.

TrackBack URL for this entry: http://www.pqpq.de/mt-tb.cgi/5

Leave a comment

About this Entry

This page contains a single entry by Johannes Plunien published on October 2, 2008 8:01 AM.

Firebug debugging fallback was the previous entry in this blog.

irssi: Twitter is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.