summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTimo Sirainen <cras@irssi.org>2000-08-13 13:54:34 +0000
committercras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564>2000-08-13 13:54:34 +0000
commitc96a0d2ac5029286d6784670ca7c16df93226dce (patch)
tree7673dea7570338493c0a4ac9ee37561c550b64b0
parent072b8a75e04233b0197fa044ad9775528a831779 (diff)
downloadirssi-c96a0d2ac5029286d6784670ca7c16df93226dce.zip
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
-rw-r--r--docs/perl.txt8
-rw-r--r--src/perl/xs/Irssi-window.xs12
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);
#*******************************