Skip to content

Instantly share code, notes, and snippets.

@mnordhoff
Last active August 29, 2015 13:56
Show Gist options
  • Save mnordhoff/9226708 to your computer and use it in GitHub Desktop.
Save mnordhoff/9226708 to your computer and use it in GitHub Desktop.
use vars qw($VERSION %IRSSI);
$VERSION = '0.1';
%IRSSI = (
authors => 'Matt Nordhoff',
contact => '[email protected]',
description => "/w/w 10",
name => 'ww',
);
sub send_text {
my ($line, $server, $witem) = @_;
my ($window) = $line =~ /^(?:\/+w+\s*\d*\s*)+\/+w+\s*(\d+)\s*$/;
if ($window) {
Irssi::command("window goto $window");
Irssi::signal_stop();
}
}
Irssi::signal_add('send text', \&send_text);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment