summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTimo Sirainen <cras@irssi.org>2000-04-28 09:16:14 +0000
committercras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564>2000-04-28 09:16:14 +0000
commit576d5d6a7b3953886d91c2467f27943f79a27ab2 (patch)
tree3c2809012ee7ff26ae64e5d92f58f7c829cda33f /src
parenteea919678ccc3bcea57911fa87e11b9a7298dfae (diff)
downloadirssi-576d5d6a7b3953886d91c2467f27943f79a27ab2.zip
Implemented Irssi::Window::command(), Irssi::Windowitem::command()
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@195 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src')
-rw-r--r--src/perl/xs/Irssi-window.xs16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/perl/xs/Irssi-window.xs b/src/perl/xs/Irssi-window.xs
index f28acf92..a7304d49 100644
--- a/src/perl/xs/Irssi-window.xs
+++ b/src/perl/xs/Irssi-window.xs
@@ -86,6 +86,15 @@ PPCODE:
hv_store(hv, "last_timestamp", 14, newSViv(window->last_timestamp), 0);
XPUSHs(sv_2mortal(newRV_noinc((SV*)hv)));
+void
+command(window, cmd, server=window->active_server, item=window->active)
+ Irssi::Window window
+ char *cmd
+ Irssi::Server server
+ Irssi::Windowitem item
+CODE:
+ signal_emit("send command", 3, cmd, server, item);
+
#*******************************
MODULE = Irssi PACKAGE = Irssi::Windowitem
#*******************************
@@ -104,3 +113,10 @@ PPCODE:
hv_store(hv, "name", 4, new_pv(item->name), 0);
hv_store(hv, "new_data", 8, newSViv(item->new_data), 0);
XPUSHs(sv_2mortal(newRV_noinc((SV*)hv)));
+
+void
+command(item, cmd)
+ Irssi::Windowitem item
+ char *cmd
+CODE:
+ signal_emit("send command", 3, cmd, item->server, item);