aboutsummaryrefslogtreecommitdiffstats
path: root/feature-tests/redir-input.pl
blob: ed77d3c9c539d2432690babb77609541142320ba (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
use strict;
use warnings;


use Irssi;
use Irssi::Irc;
use Irssi::TextUI;

use Data::Dumper;


our $VERSION = '0.1';
our %IRSSI = (
              authors     => 'shabble',
              contact     => 'shabble+irssi@metavore.org',
              name        => '',
              description => '',
              license     => 'Public Domain',
             );


Irssi::command_bind("ri", \&cmd_ri);
Irssi::signal_register({ 'gui entry redirect' => [ qw/string string intptr intptr/]});
sub cmd_ri {
    my ($args, $server, $witem) = @_;
    my $win = Irssi::active_win();
    my ($x, $y) = (0, 0);
    Irssi::signal_emit('gui entry redirect', 'sub_blah', "bacon", $x, $y);
    #my $ref = Irssi::windows_refnum_last
#    $win->format_create_dest(Irssi::MSGLEVEL_ClIENTCRAP());
}

sub sub_blah { print "Moo" }