Skip to content

Instantly share code, notes, and snippets.

@saihtaM
Last active June 12, 2024 13:05
Show Gist options
  • Save saihtaM/5842390 to your computer and use it in GitHub Desktop.
Save saihtaM/5842390 to your computer and use it in GitHub Desktop.
irssi script: Close all open quries (and DCC chats)
use Irssi;
use vars qw($VERSION %IRSSI);
$VERSION = "1.0";
%IRSSI = (
authors => "Mathias F. Svendsen",
contact => "#Mathias @ irc.QuakeNet.org",
name => "Close all open quries (and DCC chats)",
description => "A quick command to close all those queries you have!",
license => "GPL",
url => "http://okey.dk/"
# I stole the idea from Johannes Plunien - including some lines from his script.
# But he used some weird annoying perl modules that required the user to search for hours - this one doesnt require anything.
);
Irssi::command_bind "caq", sub {
foreach my $window ( Irssi::windows() ) {
my $act = $window->{active};
next unless defined $act->{type};
$window->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