[wiki] [sites] wiki updated

From: <hg_AT_suckless.org>
Date: Wed, 21 Jul 2010 22:51:41 +0000 (UTC)

changeset: 591:971a6d18fc96
tag: tip
user: Evan Gates <evan.gates_AT_gmail.com>
date: Wed Jul 21 15:52:21 2010 -0700
files: tools.suckless.org/ii/patches/exec.md tools.suckless.org/ii/patches/ii-1.4-exec.diff
description:
added ii-1.4-exec.diff and corresponding wiki page


diff -r bd913f6dc52d -r 971a6d18fc96 tools.suckless.org/ii/patches/exec.md
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tools.suckless.org/ii/patches/exec.md Wed Jul 21 15:52:21 2010 -0700
_AT_@ -0,0 +1,19 @@
+EXEC
+====
+
+Description
+-----------
+
+Adds support for '/e cmd' printing output of cmd to the channel. True this is
+possible doing 'cmd > in', but this is for lazy people (me). Be careful not to
+flood.
+
+Download
+--------
+
+* [ii-1.4-exec.diff](ii-1.4-exec.diff)
+
+Author
+------
+
+* Evan Gates (emg) <[evan.gates_AT_gmail.com](mailto:evan.gates_AT_gmail.com)>
diff -r bd913f6dc52d -r 971a6d18fc96 tools.suckless.org/ii/patches/ii-1.4-exec.diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tools.suckless.org/ii/patches/ii-1.4-exec.diff Wed Jul 21 15:52:21 2010 -0700
_AT_@ -0,0 +1,30 @@
+diff -r d93eaacde742 ii.c
+--- a/ii.c Fri Jun 25 10:55:05 2010 +0200
++++ b/ii.c Wed Jul 21 15:51:29 2010 -0700
+_AT_@ -284,6 +284,26 @@
+ rm_channel(c);
+ return;
+ break;
++ case 'e':
++ if(strlen(buf)>=3) {
++ char newbuf[PIPE_BUF];
++ FILE *fp;
++ int len;
++
++ if(!(fp = popen(&buf[3], "r"))) {
++ fprintf(stderr, "error running %s\n", &buf[3]);
++ return;
++ }
++ while (fgets(newbuf, sizeof(newbuf), fp)) {
++ len = strlen(newbuf);
++ if (newbuf[len - 1] == '\n')
++ newbuf[len - 1] = '\0';
++ proc_channels_privmsg(c->name, newbuf);
++ }
++ pclose(fp);
++ }
++ return;
++ break;
+ default:
+ snprintf(message, PIPE_BUF, "%s\r\n", &buf[1]);
+ break;
Received on Thu Jul 22 2010 - 00:51:41 CEST

This archive was generated by hypermail 2.3.0 : Thu Sep 13 2012 - 19:31:23 CEST