diff src/buddy.c @ 1229:229bf438c591

[gaim-migrate @ 1239] not sure if this works yet committer: Tailor Script <tailor@pidgin.im>
author Eric Warmenhoven <eric@warmenhoven.org>
date Mon, 11 Dec 2000 07:42:19 +0000
parents cda9dfc65693
children 5395053cdee1
line wrap: on
line diff
--- a/src/buddy.c	Mon Dec 11 05:39:15 2000 +0000
+++ b/src/buddy.c	Mon Dec 11 07:42:19 2000 +0000
@@ -1333,6 +1333,22 @@
                         	write_to_conv(c, b->message, WFLAG_SEND, NULL);
                                 serv_send_im(u->gc, name, b->message, 0);
 			}
+			if (b->cmd == 1)
+			{
+				int pid = fork();
+
+				if (pid == 0) {
+					char *args[4];
+					args[0] = "sh";
+					args[1] = "-c";
+					args[2] = b->command;
+					args[3] = NULL;
+					execvp(args[0], args);
+					_exit(0);
+				} else if (pid > 0) {
+					gtk_timeout_add(100, (GtkFunction)clean_pid, NULL);
+				}
+			}
                         
                         rem_bp(NULL, b);