Last active
June 12, 2024 13:05
-
-
Save saihtaM/5842390 to your computer and use it in GitHub Desktop.
irssi script: Close all open quries (and DCC chats)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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