From c96a0d2ac5029286d6784670ca7c16df93226dce Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Sun, 13 Aug 2000 13:54:34 +0000 Subject: Implemented Irssi::print_window(), added optional level parameter to Irssi::print() git-svn-id: http://svn.irssi.org/repos/irssi/trunk@597 dbcabf3a-b0e7-0310-adc4-f8d773084564 --- docs/perl.txt | 8 ++++++-- src/perl/xs/Irssi-window.xs | 12 ++++++++++-- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/docs/perl.txt b/docs/perl.txt index dfe9d4e4..8183dc65 100644 --- a/docs/perl.txt +++ b/docs/perl.txt @@ -103,8 +103,12 @@ commands() - return list of all commands dccs() - return list of all dcc connections logs() - return list of all log files -print(str) - Print `str' to current window as "Irssi notice". +print(str, [level]) + Print `str' to some window (status/current probably), default level is + "Irssi notice". + +print_window(str, [level]) + Print `str' to current window, default level is "Irssi notice". command(cmd, [Server server, [Channel channel]]) Send a command `cmd' (in current channel). This will work just as if you diff --git a/src/perl/xs/Irssi-window.xs b/src/perl/xs/Irssi-window.xs index a7304d49..f1766ffa 100644 --- a/src/perl/xs/Irssi-window.xs +++ b/src/perl/xs/Irssi-window.xs @@ -23,10 +23,18 @@ OUTPUT: RETVAL void -print(str) +print(str, level=MSGLEVEL_CLIENTNOTICE) char *str + int level; CODE: - printtext(NULL, NULL, MSGLEVEL_CLIENTNOTICE, str); + printtext(NULL, NULL, level, str); + +void +print_window(str, level=MSGLEVEL_CLIENTNOTICE) + char *str + int level; +CODE: + printtext_window(active_win, level, str); #******************************* -- cgit v1.2.3