aboutsummaryrefslogtreecommitdiffstats
path: root/feature-tests/format-test.pl
blob: 2c99d50b9d3da08172b82deecafd4fa4b31c44a7 (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
34
use strict;
use warnings;


use Irssi;


our $VERSION = '0.1';
our %IRSSI = (
              authors     => '',
              contact     => '',
              name        => '',
              description => '',
              license     => 'Public Domain',
             );

sub actually_printformat {
    my ($win, $level, $module, $format, @args) = @_;
    {
        # deeeeeeep black magic.
        local *CORE::GLOBAL::caller = sub { $module };
        $win->printformat($level, $format, @args);
    }

}

init();

sub init {
    my $win = Irssi::active_win();
    actually_printformat($win, Irssi::MSGLEVEL_CLIENTCRAP, 'fe-common/irc',
                               "kill_server", "foo", "bar", "horse", "cake");

}