aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTom Feist <shabble@metavore.org>2011-01-09 21:46:51 +0000
committerTom Feist <shabble@metavore.org>2011-01-09 21:46:51 +0000
commit42e4d2b23759185fa0d32decab19c95614e91e03 (patch)
tree6c37220ef04310f4a864099700280e1aa0667930
parentadded new module stub for attemping to extend perl API (diff)
downloadirssi-scripts-42e4d2b23759185fa0d32decab19c95614e91e03.tar.gz
irssi-scripts-42e4d2b23759185fa0d32decab19c95614e91e03.zip
some dirty hacks to make the package appear as an internal module, LeoNerd++
-rw-r--r--feature-tests/format-test.pl18
1 files changed, 13 insertions, 5 deletions
diff --git a/feature-tests/format-test.pl b/feature-tests/format-test.pl
index d8be412..2c99d50 100644
--- a/feature-tests/format-test.pl
+++ b/feature-tests/format-test.pl
@@ -14,13 +14,21 @@ our %IRSSI = (
license => 'Public Domain',
);
-init();
+sub actually_printformat {
+ my ($win, $level, $module, $format, @args) = @_;
+ {
+ # deeeeeeep black magic.
+ local *CORE::GLOBAL::caller = sub { $module };
+ $win->printformat($level, $format, @args);
+ }
-sub init {
- Irssi::command_bind('ft', \&format_test);
}
+init();
+
+sub init {
+ my $win = Irssi::active_win();
+ actually_printformat($win, Irssi::MSGLEVEL_CLIENTCRAP, 'fe-common/irc',
+ "kill_server", "foo", "bar", "horse", "cake");
-sub format_test {
- my ($args, $win, $server) = @_;
}